22 CSS Glassmorphism13 / 22
Glassmorphism Pricing Table
A full three-tier table — not a single card — where the middle tier is elevated with a thicker film, a stronger rim and a badge, so the glass itself encodes hierarchy. The monthly/yearly switch is a radio group read with :has(): prices, savings copy and billing notes all change with zero JavaScript.
Published Updated
The code
<div class="gm-13">
<input class="gm-13__sr" type="checkbox" id="gm-13-theme">
<label class="gm-13__theme" for="gm-13-theme" title="Switch theme">
<svg class="gm-13__sun" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="4.4" stroke="currentColor" stroke-width="1.7"/><path d="M12 2.6v2.3M12 19.1v2.3M2.6 12h2.3M19.1 12h2.3M5.3 5.3l1.7 1.7M17 17l1.7 1.7M18.7 5.3L17 7M7 17l-1.7 1.7" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/></svg>
<svg class="gm-13__moon" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M20.5 14.4A8.4 8.4 0 0 1 9.6 3.5 8.6 8.6 0 1 0 20.5 14.4Z" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/></svg>
<span class="gm-13__vh">Switch light or dark theme</span>
</label>
<div class="gm-13__stage">
<section class="gm-13__wrap" aria-labelledby="gm-13-h">
<header class="gm-13__head">
<p class="gm-13__eyebrow">Atlas Platform</p>
<h2 class="gm-13__h" id="gm-13-h">Pricing that scales with the surface area you ship</h2>
<div class="gm-13__cycle" role="group" aria-label="Billing period">
<input class="gm-13__sr" type="radio" name="gm-13-cycle" id="gm-13-monthly" value="monthly" checked>
<label class="gm-13__seg" for="gm-13-monthly">Monthly</label>
<input class="gm-13__sr" type="radio" name="gm-13-cycle" id="gm-13-yearly" value="yearly">
<label class="gm-13__seg" for="gm-13-yearly">Yearly <span class="gm-13__save">−20%</span></label>
</div>
</header>
<ul class="gm-13__grid">
<li class="gm-13__tier">
<h3 class="gm-13__name">Solo</h3>
<p class="gm-13__blurb">One developer, unlimited local previews.</p>
<p class="gm-13__price"><span class="gm-13__cur">$</span><span class="gm-13__mo">12</span><span class="gm-13__yr">10</span><span class="gm-13__per">/mo</span></p>
<p class="gm-13__billing"><span class="gm-13__mo">Billed monthly</span><span class="gm-13__yr">$115 billed yearly</span></p>
<ul class="gm-13__feats">
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>1 seat, 3 projects</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>100 GB bandwidth</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Community support</li>
</ul>
<button class="gm-13__cta" type="button">Start free</button>
</li>
<li class="gm-13__tier gm-13__tier--featured">
<p class="gm-13__badge">Most popular</p>
<h3 class="gm-13__name">Team</h3>
<p class="gm-13__blurb">Shared design tokens, preview links and review flows.</p>
<p class="gm-13__price"><span class="gm-13__cur">$</span><span class="gm-13__mo">29</span><span class="gm-13__yr">23</span><span class="gm-13__per">/mo</span></p>
<p class="gm-13__billing"><span class="gm-13__mo">Per seat, billed monthly</span><span class="gm-13__yr">$278 per seat, yearly</span></p>
<ul class="gm-13__feats">
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Up to 20 seats</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>1 TB bandwidth, edge cache</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Visual regression snapshots</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Priority support, 8h SLA</li>
</ul>
<button class="gm-13__cta gm-13__cta--primary" type="button">Start 14-day trial</button>
</li>
<li class="gm-13__tier">
<h3 class="gm-13__name">Scale</h3>
<p class="gm-13__blurb">SSO, audit trails and dedicated edge regions.</p>
<p class="gm-13__price"><span class="gm-13__cur">$</span><span class="gm-13__mo">99</span><span class="gm-13__yr">79</span><span class="gm-13__per">/mo</span></p>
<p class="gm-13__billing"><span class="gm-13__mo">Per seat, billed monthly</span><span class="gm-13__yr">$950 per seat, yearly</span></p>
<ul class="gm-13__feats">
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Unlimited seats and projects</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>SAML SSO and audit log</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Dedicated edge region</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Shared Slack channel</li>
</ul>
<button class="gm-13__cta" type="button">Talk to sales</button>
</li>
</ul>
<p class="gm-13__foot">Prices in USD, excluding tax. Cancel any time — usage above plan limits is billed at $0.09 per GB.</p>
</section>
</div>
</div><div class="gm-13">
<input class="gm-13__sr" type="checkbox" id="gm-13-theme">
<label class="gm-13__theme" for="gm-13-theme" title="Switch theme">
<svg class="gm-13__sun" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="4.4" stroke="currentColor" stroke-width="1.7"/><path d="M12 2.6v2.3M12 19.1v2.3M2.6 12h2.3M19.1 12h2.3M5.3 5.3l1.7 1.7M17 17l1.7 1.7M18.7 5.3L17 7M7 17l-1.7 1.7" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/></svg>
<svg class="gm-13__moon" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M20.5 14.4A8.4 8.4 0 0 1 9.6 3.5 8.6 8.6 0 1 0 20.5 14.4Z" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/></svg>
<span class="gm-13__vh">Switch light or dark theme</span>
</label>
<div class="gm-13__stage">
<section class="gm-13__wrap" aria-labelledby="gm-13-h">
<header class="gm-13__head">
<p class="gm-13__eyebrow">Atlas Platform</p>
<h2 class="gm-13__h" id="gm-13-h">Pricing that scales with the surface area you ship</h2>
<div class="gm-13__cycle" role="group" aria-label="Billing period">
<input class="gm-13__sr" type="radio" name="gm-13-cycle" id="gm-13-monthly" value="monthly" checked>
<label class="gm-13__seg" for="gm-13-monthly">Monthly</label>
<input class="gm-13__sr" type="radio" name="gm-13-cycle" id="gm-13-yearly" value="yearly">
<label class="gm-13__seg" for="gm-13-yearly">Yearly <span class="gm-13__save">−20%</span></label>
</div>
</header>
<ul class="gm-13__grid">
<li class="gm-13__tier">
<h3 class="gm-13__name">Solo</h3>
<p class="gm-13__blurb">One developer, unlimited local previews.</p>
<p class="gm-13__price"><span class="gm-13__cur">$</span><span class="gm-13__mo">12</span><span class="gm-13__yr">10</span><span class="gm-13__per">/mo</span></p>
<p class="gm-13__billing"><span class="gm-13__mo">Billed monthly</span><span class="gm-13__yr">$115 billed yearly</span></p>
<ul class="gm-13__feats">
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>1 seat, 3 projects</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>100 GB bandwidth</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Community support</li>
</ul>
<button class="gm-13__cta" type="button">Start free</button>
</li>
<li class="gm-13__tier gm-13__tier--featured">
<p class="gm-13__badge">Most popular</p>
<h3 class="gm-13__name">Team</h3>
<p class="gm-13__blurb">Shared design tokens, preview links and review flows.</p>
<p class="gm-13__price"><span class="gm-13__cur">$</span><span class="gm-13__mo">29</span><span class="gm-13__yr">23</span><span class="gm-13__per">/mo</span></p>
<p class="gm-13__billing"><span class="gm-13__mo">Per seat, billed monthly</span><span class="gm-13__yr">$278 per seat, yearly</span></p>
<ul class="gm-13__feats">
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Up to 20 seats</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>1 TB bandwidth, edge cache</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Visual regression snapshots</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Priority support, 8h SLA</li>
</ul>
<button class="gm-13__cta gm-13__cta--primary" type="button">Start 14-day trial</button>
</li>
<li class="gm-13__tier">
<h3 class="gm-13__name">Scale</h3>
<p class="gm-13__blurb">SSO, audit trails and dedicated edge regions.</p>
<p class="gm-13__price"><span class="gm-13__cur">$</span><span class="gm-13__mo">99</span><span class="gm-13__yr">79</span><span class="gm-13__per">/mo</span></p>
<p class="gm-13__billing"><span class="gm-13__mo">Per seat, billed monthly</span><span class="gm-13__yr">$950 per seat, yearly</span></p>
<ul class="gm-13__feats">
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Unlimited seats and projects</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>SAML SSO and audit log</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Dedicated edge region</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Shared Slack channel</li>
</ul>
<button class="gm-13__cta" type="button">Talk to sales</button>
</li>
</ul>
<p class="gm-13__foot">Prices in USD, excluding tax. Cancel any time — usage above plan limits is billed at $0.09 per GB.</p>
</section>
</div>
</div>@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
.gm-13 {
--a1: rgba(165,180,252,.6);
--a2: rgba(103,232,249,.5);
--a3: rgba(249,168,212,.55);
--a4: rgba(110,231,183,.45);
--base: #f1f3fb;
--base2: #e3e8fd;
--ink: #0f1120;
--muted: rgba(15,17,32,.68);
--tint: #ffffff;
--accent: #7c3aed;
--rim: rgba(255,255,255,.95);
--rim2: rgba(255,255,255,.5);
--edge: rgba(15,17,32,.12);
--mono: 'Geist Mono',ui-monospace,'SFMono-Regular',Menlo,monospace;
width: 100%;
min-height: 100vh;
min-height: 100svh;
display: block;
position: relative;
overflow: hidden;
box-sizing: border-box;
color: var(--ink);
isolation: isolate;
font-family: 'Geist',ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;
background: radial-gradient(54% 46% at 12% 14%, var(--a1) 0%, transparent 62%), radial-gradient(46% 40% at 88% 16%, var(--a2) 0%, transparent 58%), radial-gradient(50% 44% at 80% 88%, var(--a3) 0%, transparent 60%), radial-gradient(44% 38% at 16% 90%, var(--a4) 0%, transparent 58%), linear-gradient(160deg, var(--base) 0%, var(--base2) 52%, var(--base) 100%);
}
.gm-13 *,
.gm-13 *::before,
.gm-13 *::after {
box-sizing: border-box;
}
@supports (color: oklch(0.7 0.1 300)) {
.gm-13 {
--a1: oklch(0.68 0.19 280 / .62);
--a2: oklch(0.82 0.16 200 / .52);
--a3: oklch(0.74 0.19 5 / .5);
--a4: oklch(0.8 0.15 165 / .42);
--base: oklch(0.97 0.008 275);
--base2: oklch(0.93 0.015 285);
--accent: oklch(0.75 0.16 292);
}
}
.gm-13__vh {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
.gm-13__sr {
position: absolute;
width: 1px;
height: 1px;
opacity: 0;
pointer-events: none;
}
.gm-13__theme {
position: absolute;
inset-block-start: 1.15rem;
inset-inline-end: 1.15rem;
z-index: 8;
inline-size: 2.5rem;
block-size: 2.5rem;
display: grid;
place-items: center;
cursor: pointer;
border-radius: 999px;
color: var(--ink);
background: rgba(255,255,255,.14);
border: 1px solid var(--edge);
-webkit-backdrop-filter: blur(10px) saturate(160%);
backdrop-filter: blur(10px) saturate(160%);
box-shadow: inset 0 1px 0 var(--rim), 0 10px 24px -14px rgba(0,0,0,.7);
transition: scale .18s ease;
}
.gm-13__theme::after {
content: '';
position: absolute;
inset: -2px;
border-radius: inherit;
}
.gm-13__theme svg {
inline-size: 1.15rem;
block-size: 1.15rem;
}
.gm-13__theme:hover {
scale: 1.06;
}
.gm-13__sr:focus-visible + .gm-13__theme {
outline: 2px solid var(--ink);
outline-offset: 3px;
}
.gm-13__moon {
display: none;
}
.gm-13__stage {
min-height: 100vh;
min-height: 100svh;
display: grid;
place-items: center;
padding: clamp(1.25rem,4vw,3.5rem);
}
.gm-13__wrap {
inline-size: min(74rem,100%);
}
.gm-13__head {
display: grid;
justify-items: center;
gap: .85rem;
text-align: center;
margin-block-end: clamp(1.75rem,4vw,2.75rem);
}
.gm-13__eyebrow {
margin: 0;
font-family: var(--mono);
font-size: .72rem;
letter-spacing: .16em;
text-transform: uppercase;
color: var(--muted);
}
.gm-13__h {
margin: 0;
max-inline-size: 38rem;
font-size: clamp(1.85rem,4.4vw,2.9rem);
font-weight: 600;
letter-spacing: -.032em;
line-height: 1.06;
text-wrap: balance;
}
.gm-13__cycle {
display: inline-flex;
align-items: center;
gap: .25rem;
padding: .3rem;
border-radius: 999px;
background: rgba(255,255,255,.12);
border: 1px solid var(--edge);
-webkit-backdrop-filter: blur(16px) saturate(160%);
backdrop-filter: blur(16px) saturate(160%);
box-shadow: inset 0 1px 0 var(--rim);
}
.gm-13__seg {
display: inline-flex;
align-items: center;
gap: .4rem;
min-block-size: 2.5rem;
padding: .5rem 1.05rem;
border-radius: 999px;
cursor: pointer;
font-size: .92rem;
font-weight: 500;
color: var(--ink);
transition: background .18s ease, color .18s ease;
}
.gm-13__save {
padding: .1rem .35rem;
border-radius: .35rem;
font-family: var(--mono);
font-size: .66rem;
background: rgba(255,255,255,.18);
border: 1px solid var(--edge);
}
.gm-13:has(#gm-13-monthly:checked) .gm-13__seg[for="gm-13-monthly"],
.gm-13:has(#gm-13-yearly:checked) .gm-13__seg[for="gm-13-yearly"] {
background: rgba(255,255,255,.22);
box-shadow: inset 0 1px 0 var(--rim);
}
.gm-13__sr:focus-visible + .gm-13__seg {
outline: 2px solid var(--ink);
outline-offset: 2px;
}
.gm-13__grid {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: clamp(1rem,2vw,1.5rem);
grid-template-columns: repeat(auto-fit,minmax(16rem,1fr));
align-items: start;
}
.gm-13__tier {
--film: 14%;
--b: 20px;
position: relative;
display: flex;
flex-direction: column;
gap: .6rem;
padding: clamp(1.3rem,2.4vw,1.85rem);
border-radius: 1.6rem;
background: rgba(255,255,255,.14);
border: 1px solid var(--edge);
box-shadow: inset 0 1px 0 var(--rim), inset 0 -1px 0 var(--rim2), 0 30px 66px -30px rgba(0,0,0,.65);
transition: translate .25s cubic-bezier(.2,.7,.3,1);
}
@supports (background: color-mix(in oklab, white 10%, transparent)) {
.gm-13__tier {
background: color-mix(in oklab, var(--tint) var(--film), transparent);
}
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
.gm-13__tier {
-webkit-backdrop-filter: blur(var(--b)) saturate(175%);
backdrop-filter: blur(var(--b)) saturate(175%);
}
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
.gm-13__tier {
background: rgba(18,16,44,.9);
}
}
.gm-13__tier:hover {
translate: 0 -4px;
}
.gm-13__tier--featured {
--film: 22%;
--b: 28px;
box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(255,255,255,.18), 0 44px 90px -34px rgba(0,0,0,.75);
z-index: 1;
}
@media (min-width: 54rem) {
.gm-13__tier--featured {
margin-block: -1.25rem;
padding-block: 2.6rem;
}
}
.gm-13__badge {
position: absolute;
inset-block-start: 1.1rem;
inset-inline-end: 1.1rem;
margin: 0;
padding: .28rem .55rem;
border-radius: .5rem;
font-family: var(--mono);
font-size: .62rem;
letter-spacing: .12em;
text-transform: uppercase;
background: var(--accent);
color: #160c2c;
box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.gm-13__name {
margin: 0;
font-size: 1.15rem;
font-weight: 600;
letter-spacing: -.01em;
}
.gm-13__blurb {
margin: 0;
min-block-size: 2.6rem;
font-size: .9rem;
line-height: 1.45;
color: var(--muted);
text-wrap: pretty;
}
.gm-13__price {
margin: .3rem 0 0;
display: flex;
align-items: baseline;
gap: .1rem;
font-weight: 600;
letter-spacing: -.04em;
font-variant-numeric: tabular-nums;
font-size: clamp(2.4rem,5.4vw,3.1rem);
line-height: 1;
}
.gm-13__cur {
font-size: .42em;
translate: 0 -.85em;
opacity: .8;
}
.gm-13__per {
font-size: .28em;
font-weight: 500;
letter-spacing: 0;
opacity: .66;
}
.gm-13__billing {
margin: 0;
font-family: var(--mono);
font-size: .68rem;
letter-spacing: .04em;
color: var(--muted);
}
.gm-13__yr {
display: none;
}
.gm-13:has(#gm-13-yearly:checked) .gm-13__mo {
display: none;
}
.gm-13:has(#gm-13-yearly:checked) .gm-13__yr {
display: inline;
}
.gm-13__feats {
list-style: none;
margin: .6rem 0 auto;
padding: .9rem 0 0;
border-block-start: 1px solid var(--rim2);
display: grid;
gap: .55rem;
font-size: .9rem;
}
.gm-13__feats li {
display: grid;
grid-template-columns: 1.15rem 1fr;
gap: .6rem;
align-items: start;
line-height: 1.4;
color: var(--ink);
opacity: .9;
}
.gm-13__feats svg {
inline-size: 1.15rem;
block-size: 1.15rem;
margin-block-start: .1rem;
color: var(--accent);
}
.gm-13__cta {
margin-block-start: 1.1rem;
min-block-size: 2.75rem;
padding: .8rem 1.1rem;
border-radius: .9rem;
cursor: pointer;
font: inherit;
font-size: .94rem;
font-weight: 500;
color: var(--ink);
background: rgba(255,255,255,.13);
border: 1px solid var(--edge);
-webkit-backdrop-filter: blur(12px);
backdrop-filter: blur(12px);
box-shadow: inset 0 1px 0 var(--rim2);
transition: translate .18s ease, background .18s ease;
}
.gm-13__cta--primary {
color: #160c2c;
background: var(--accent);
border-color: transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 16px 34px -18px rgba(0,0,0,.7);
}
.gm-13__cta:hover {
translate: 0 -2px;
}
.gm-13__cta:focus-visible {
outline: 2px solid var(--ink);
outline-offset: 3px;
}
.gm-13__foot {
margin: clamp(1.4rem,3vw,2rem) 0 0;
text-align: center;
font-size: .85rem;
color: var(--muted);
}
.gm-13[data-theme="light"],
.gm-13:has(#gm-13-theme:checked) {
--a1: rgba(129,140,248,.6);
--a2: rgba(34,211,238,.5);
--a3: rgba(244,114,182,.5);
--a4: rgba(52,211,153,.4);
--base: #05070f;
--base2: #131033;
--ink: #f9fafe;
--muted: rgba(249,250,254,.7);
--rim: rgba(255,255,255,.5);
--rim2: rgba(255,255,255,.15);
--edge: rgba(255,255,255,.18);
--accent: #a78bfa;
}
.gm-13:has(#gm-13-theme:checked) .gm-13__sun {
display: none;
}
.gm-13:has(#gm-13-theme:checked) .gm-13__moon {
display: block;
}
.gm-13[data-theme="light"] .gm-13__badge,
.gm-13[data-theme="light"] .gm-13__cta--primary,
.gm-13:has(#gm-13-theme:checked) .gm-13__badge,
.gm-13:has(#gm-13-theme:checked) .gm-13__cta--primary {
color: #fff;
}
@media (prefers-reduced-motion: reduce) {
.gm-13 *,
.gm-13 *::before,
.gm-13 *::after {
transition: none !important;
animation: none !important;
}
}
@media (forced-colors: active) {
.gm-13__tier,
.gm-13__cta,
.gm-13__cycle,
.gm-13__theme,
.gm-13__badge {
border-color: CanvasText;
box-shadow: none;
-webkit-backdrop-filter: none;
backdrop-filter: none;
background: Canvas;
}
}@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
.gm-13 {
--a1: rgba(165,180,252,.6);
--a2: rgba(103,232,249,.5);
--a3: rgba(249,168,212,.55);
--a4: rgba(110,231,183,.45);
--base: #f1f3fb;
--base2: #e3e8fd;
--ink: #0f1120;
--muted: rgba(15,17,32,.68);
--tint: #ffffff;
--accent: #7c3aed;
--rim: rgba(255,255,255,.95);
--rim2: rgba(255,255,255,.5);
--edge: rgba(15,17,32,.12);
--mono: 'Geist Mono',ui-monospace,'SFMono-Regular',Menlo,monospace;
width: 100%;
min-height: 100vh;
min-height: 100svh;
display: block;
position: relative;
overflow: hidden;
box-sizing: border-box;
color: var(--ink);
isolation: isolate;
font-family: 'Geist',ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;
background: radial-gradient(54% 46% at 12% 14%, var(--a1) 0%, transparent 62%), radial-gradient(46% 40% at 88% 16%, var(--a2) 0%, transparent 58%), radial-gradient(50% 44% at 80% 88%, var(--a3) 0%, transparent 60%), radial-gradient(44% 38% at 16% 90%, var(--a4) 0%, transparent 58%), linear-gradient(160deg, var(--base) 0%, var(--base2) 52%, var(--base) 100%);
}
.gm-13 *,
.gm-13 *::before,
.gm-13 *::after {
box-sizing: border-box;
}
@supports (color: oklch(0.7 0.1 300)) {
.gm-13 {
--a1: oklch(0.68 0.19 280 / .62);
--a2: oklch(0.82 0.16 200 / .52);
--a3: oklch(0.74 0.19 5 / .5);
--a4: oklch(0.8 0.15 165 / .42);
--base: oklch(0.97 0.008 275);
--base2: oklch(0.93 0.015 285);
--accent: oklch(0.75 0.16 292);
}
}
.gm-13__vh {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
.gm-13__sr {
position: absolute;
width: 1px;
height: 1px;
opacity: 0;
pointer-events: none;
}
.gm-13__theme {
position: absolute;
inset-block-start: 1.15rem;
inset-inline-end: 1.15rem;
z-index: 8;
inline-size: 2.5rem;
block-size: 2.5rem;
display: grid;
place-items: center;
cursor: pointer;
border-radius: 999px;
color: var(--ink);
background: rgba(255,255,255,.14);
border: 1px solid var(--edge);
-webkit-backdrop-filter: blur(10px) saturate(160%);
backdrop-filter: blur(10px) saturate(160%);
box-shadow: inset 0 1px 0 var(--rim), 0 10px 24px -14px rgba(0,0,0,.7);
transition: scale .18s ease;
}
.gm-13__theme::after {
content: '';
position: absolute;
inset: -2px;
border-radius: inherit;
}
.gm-13__theme svg {
inline-size: 1.15rem;
block-size: 1.15rem;
}
.gm-13__theme:hover {
scale: 1.06;
}
.gm-13__sr:focus-visible + .gm-13__theme {
outline: 2px solid var(--ink);
outline-offset: 3px;
}
.gm-13__moon {
display: none;
}
.gm-13__stage {
min-height: 100vh;
min-height: 100svh;
display: grid;
place-items: center;
padding: clamp(1.25rem,4vw,3.5rem);
}
.gm-13__wrap {
inline-size: min(74rem,100%);
}
.gm-13__head {
display: grid;
justify-items: center;
gap: .85rem;
text-align: center;
margin-block-end: clamp(1.75rem,4vw,2.75rem);
}
.gm-13__eyebrow {
margin: 0;
font-family: var(--mono);
font-size: .72rem;
letter-spacing: .16em;
text-transform: uppercase;
color: var(--muted);
}
.gm-13__h {
margin: 0;
max-inline-size: 38rem;
font-size: clamp(1.85rem,4.4vw,2.9rem);
font-weight: 600;
letter-spacing: -.032em;
line-height: 1.06;
text-wrap: balance;
}
.gm-13__cycle {
display: inline-flex;
align-items: center;
gap: .25rem;
padding: .3rem;
border-radius: 999px;
background: rgba(255,255,255,.12);
border: 1px solid var(--edge);
-webkit-backdrop-filter: blur(16px) saturate(160%);
backdrop-filter: blur(16px) saturate(160%);
box-shadow: inset 0 1px 0 var(--rim);
}
.gm-13__seg {
display: inline-flex;
align-items: center;
gap: .4rem;
min-block-size: 2.5rem;
padding: .5rem 1.05rem;
border-radius: 999px;
cursor: pointer;
font-size: .92rem;
font-weight: 500;
color: var(--ink);
transition: background .18s ease, color .18s ease;
}
.gm-13__save {
padding: .1rem .35rem;
border-radius: .35rem;
font-family: var(--mono);
font-size: .66rem;
background: rgba(255,255,255,.18);
border: 1px solid var(--edge);
}
.gm-13:has(#gm-13-monthly:checked) .gm-13__seg[for="gm-13-monthly"],
.gm-13:has(#gm-13-yearly:checked) .gm-13__seg[for="gm-13-yearly"] {
background: rgba(255,255,255,.22);
box-shadow: inset 0 1px 0 var(--rim);
}
.gm-13__sr:focus-visible + .gm-13__seg {
outline: 2px solid var(--ink);
outline-offset: 2px;
}
.gm-13__grid {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: clamp(1rem,2vw,1.5rem);
grid-template-columns: repeat(auto-fit,minmax(16rem,1fr));
align-items: start;
}
.gm-13__tier {
--film: 14%;
--b: 20px;
position: relative;
display: flex;
flex-direction: column;
gap: .6rem;
padding: clamp(1.3rem,2.4vw,1.85rem);
border-radius: 1.6rem;
background: rgba(255,255,255,.14);
border: 1px solid var(--edge);
box-shadow: inset 0 1px 0 var(--rim), inset 0 -1px 0 var(--rim2), 0 30px 66px -30px rgba(0,0,0,.65);
transition: translate .25s cubic-bezier(.2,.7,.3,1);
}
@supports (background: color-mix(in oklab, white 10%, transparent)) {
.gm-13__tier {
background: color-mix(in oklab, var(--tint) var(--film), transparent);
}
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
.gm-13__tier {
-webkit-backdrop-filter: blur(var(--b)) saturate(175%);
backdrop-filter: blur(var(--b)) saturate(175%);
}
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
.gm-13__tier {
background: rgba(18,16,44,.9);
}
}
.gm-13__tier:hover {
translate: 0 -4px;
}
.gm-13__tier--featured {
--film: 22%;
--b: 28px;
box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(255,255,255,.18), 0 44px 90px -34px rgba(0,0,0,.75);
z-index: 1;
}
@media (min-width: 54rem) {
.gm-13__tier--featured {
margin-block: -1.25rem;
padding-block: 2.6rem;
}
}
.gm-13__badge {
position: absolute;
inset-block-start: 1.1rem;
inset-inline-end: 1.1rem;
margin: 0;
padding: .28rem .55rem;
border-radius: .5rem;
font-family: var(--mono);
font-size: .62rem;
letter-spacing: .12em;
text-transform: uppercase;
background: var(--accent);
color: #160c2c;
box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.gm-13__name {
margin: 0;
font-size: 1.15rem;
font-weight: 600;
letter-spacing: -.01em;
}
.gm-13__blurb {
margin: 0;
min-block-size: 2.6rem;
font-size: .9rem;
line-height: 1.45;
color: var(--muted);
text-wrap: pretty;
}
.gm-13__price {
margin: .3rem 0 0;
display: flex;
align-items: baseline;
gap: .1rem;
font-weight: 600;
letter-spacing: -.04em;
font-variant-numeric: tabular-nums;
font-size: clamp(2.4rem,5.4vw,3.1rem);
line-height: 1;
}
.gm-13__cur {
font-size: .42em;
translate: 0 -.85em;
opacity: .8;
}
.gm-13__per {
font-size: .28em;
font-weight: 500;
letter-spacing: 0;
opacity: .66;
}
.gm-13__billing {
margin: 0;
font-family: var(--mono);
font-size: .68rem;
letter-spacing: .04em;
color: var(--muted);
}
.gm-13__yr {
display: none;
}
.gm-13:has(#gm-13-yearly:checked) .gm-13__mo {
display: none;
}
.gm-13:has(#gm-13-yearly:checked) .gm-13__yr {
display: inline;
}
.gm-13__feats {
list-style: none;
margin: .6rem 0 auto;
padding: .9rem 0 0;
border-block-start: 1px solid var(--rim2);
display: grid;
gap: .55rem;
font-size: .9rem;
}
.gm-13__feats li {
display: grid;
grid-template-columns: 1.15rem 1fr;
gap: .6rem;
align-items: start;
line-height: 1.4;
color: var(--ink);
opacity: .9;
}
.gm-13__feats svg {
inline-size: 1.15rem;
block-size: 1.15rem;
margin-block-start: .1rem;
color: var(--accent);
}
.gm-13__cta {
margin-block-start: 1.1rem;
min-block-size: 2.75rem;
padding: .8rem 1.1rem;
border-radius: .9rem;
cursor: pointer;
font: inherit;
font-size: .94rem;
font-weight: 500;
color: var(--ink);
background: rgba(255,255,255,.13);
border: 1px solid var(--edge);
-webkit-backdrop-filter: blur(12px);
backdrop-filter: blur(12px);
box-shadow: inset 0 1px 0 var(--rim2);
transition: translate .18s ease, background .18s ease;
}
.gm-13__cta--primary {
color: #160c2c;
background: var(--accent);
border-color: transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 16px 34px -18px rgba(0,0,0,.7);
}
.gm-13__cta:hover {
translate: 0 -2px;
}
.gm-13__cta:focus-visible {
outline: 2px solid var(--ink);
outline-offset: 3px;
}
.gm-13__foot {
margin: clamp(1.4rem,3vw,2rem) 0 0;
text-align: center;
font-size: .85rem;
color: var(--muted);
}
.gm-13[data-theme="light"],
.gm-13:has(#gm-13-theme:checked) {
--a1: rgba(129,140,248,.6);
--a2: rgba(34,211,238,.5);
--a3: rgba(244,114,182,.5);
--a4: rgba(52,211,153,.4);
--base: #05070f;
--base2: #131033;
--ink: #f9fafe;
--muted: rgba(249,250,254,.7);
--rim: rgba(255,255,255,.5);
--rim2: rgba(255,255,255,.15);
--edge: rgba(255,255,255,.18);
--accent: #a78bfa;
}
.gm-13:has(#gm-13-theme:checked) .gm-13__sun {
display: none;
}
.gm-13:has(#gm-13-theme:checked) .gm-13__moon {
display: block;
}
.gm-13[data-theme="light"] .gm-13__badge,
.gm-13[data-theme="light"] .gm-13__cta--primary,
.gm-13:has(#gm-13-theme:checked) .gm-13__badge,
.gm-13:has(#gm-13-theme:checked) .gm-13__cta--primary {
color: #fff;
}
@media (prefers-reduced-motion: reduce) {
.gm-13 *,
.gm-13 *::before,
.gm-13 *::after {
transition: none !important;
animation: none !important;
}
}
@media (forced-colors: active) {
.gm-13__tier,
.gm-13__cta,
.gm-13__cycle,
.gm-13__theme,
.gm-13__badge {
border-color: CanvasText;
box-shadow: none;
-webkit-backdrop-filter: none;
backdrop-filter: none;
background: Canvas;
}
}Here's a working CSS Glassmorphism from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: Glassmorphism Pricing Table
Source: https://codefronts.com/design-styles/css-glassmorphism/pricing-glass/
A full three-tier table — not a single card — where the middle tier is elevated with a thicker film, a stronger rim and a badge, so the glass itself encodes hierarchy. The monthly/yearly switch is a radio group read with :has(): prices, savings copy and billing notes all change with zero JavaScript.
## HTML
```html
<div class="gm-13">
<input class="gm-13__sr" type="checkbox" id="gm-13-theme">
<label class="gm-13__theme" for="gm-13-theme" title="Switch theme">
<svg class="gm-13__sun" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="4.4" stroke="currentColor" stroke-width="1.7"/><path d="M12 2.6v2.3M12 19.1v2.3M2.6 12h2.3M19.1 12h2.3M5.3 5.3l1.7 1.7M17 17l1.7 1.7M18.7 5.3L17 7M7 17l-1.7 1.7" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/></svg>
<svg class="gm-13__moon" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M20.5 14.4A8.4 8.4 0 0 1 9.6 3.5 8.6 8.6 0 1 0 20.5 14.4Z" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/></svg>
<span class="gm-13__vh">Switch light or dark theme</span>
</label>
<div class="gm-13__stage">
<section class="gm-13__wrap" aria-labelledby="gm-13-h">
<header class="gm-13__head">
<p class="gm-13__eyebrow">Atlas Platform</p>
<h2 class="gm-13__h" id="gm-13-h">Pricing that scales with the surface area you ship</h2>
<div class="gm-13__cycle" role="group" aria-label="Billing period">
<input class="gm-13__sr" type="radio" name="gm-13-cycle" id="gm-13-monthly" value="monthly" checked>
<label class="gm-13__seg" for="gm-13-monthly">Monthly</label>
<input class="gm-13__sr" type="radio" name="gm-13-cycle" id="gm-13-yearly" value="yearly">
<label class="gm-13__seg" for="gm-13-yearly">Yearly <span class="gm-13__save">−20%</span></label>
</div>
</header>
<ul class="gm-13__grid">
<li class="gm-13__tier">
<h3 class="gm-13__name">Solo</h3>
<p class="gm-13__blurb">One developer, unlimited local previews.</p>
<p class="gm-13__price"><span class="gm-13__cur">$</span><span class="gm-13__mo">12</span><span class="gm-13__yr">10</span><span class="gm-13__per">/mo</span></p>
<p class="gm-13__billing"><span class="gm-13__mo">Billed monthly</span><span class="gm-13__yr">$115 billed yearly</span></p>
<ul class="gm-13__feats">
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>1 seat, 3 projects</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>100 GB bandwidth</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Community support</li>
</ul>
<button class="gm-13__cta" type="button">Start free</button>
</li>
<li class="gm-13__tier gm-13__tier--featured">
<p class="gm-13__badge">Most popular</p>
<h3 class="gm-13__name">Team</h3>
<p class="gm-13__blurb">Shared design tokens, preview links and review flows.</p>
<p class="gm-13__price"><span class="gm-13__cur">$</span><span class="gm-13__mo">29</span><span class="gm-13__yr">23</span><span class="gm-13__per">/mo</span></p>
<p class="gm-13__billing"><span class="gm-13__mo">Per seat, billed monthly</span><span class="gm-13__yr">$278 per seat, yearly</span></p>
<ul class="gm-13__feats">
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Up to 20 seats</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>1 TB bandwidth, edge cache</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Visual regression snapshots</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Priority support, 8h SLA</li>
</ul>
<button class="gm-13__cta gm-13__cta--primary" type="button">Start 14-day trial</button>
</li>
<li class="gm-13__tier">
<h3 class="gm-13__name">Scale</h3>
<p class="gm-13__blurb">SSO, audit trails and dedicated edge regions.</p>
<p class="gm-13__price"><span class="gm-13__cur">$</span><span class="gm-13__mo">99</span><span class="gm-13__yr">79</span><span class="gm-13__per">/mo</span></p>
<p class="gm-13__billing"><span class="gm-13__mo">Per seat, billed monthly</span><span class="gm-13__yr">$950 per seat, yearly</span></p>
<ul class="gm-13__feats">
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Unlimited seats and projects</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>SAML SSO and audit log</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Dedicated edge region</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Shared Slack channel</li>
</ul>
<button class="gm-13__cta" type="button">Talk to sales</button>
</li>
</ul>
<p class="gm-13__foot">Prices in USD, excluding tax. Cancel any time — usage above plan limits is billed at $0.09 per GB.</p>
</section>
</div>
</div>
```
## CSS
```css
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
.gm-13 {
--a1: rgba(165,180,252,.6);
--a2: rgba(103,232,249,.5);
--a3: rgba(249,168,212,.55);
--a4: rgba(110,231,183,.45);
--base: #f1f3fb;
--base2: #e3e8fd;
--ink: #0f1120;
--muted: rgba(15,17,32,.68);
--tint: #ffffff;
--accent: #7c3aed;
--rim: rgba(255,255,255,.95);
--rim2: rgba(255,255,255,.5);
--edge: rgba(15,17,32,.12);
--mono: 'Geist Mono',ui-monospace,'SFMono-Regular',Menlo,monospace;
width: 100%;
min-height: 100vh;
min-height: 100svh;
display: block;
position: relative;
overflow: hidden;
box-sizing: border-box;
color: var(--ink);
isolation: isolate;
font-family: 'Geist',ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;
background: radial-gradient(54% 46% at 12% 14%, var(--a1) 0%, transparent 62%), radial-gradient(46% 40% at 88% 16%, var(--a2) 0%, transparent 58%), radial-gradient(50% 44% at 80% 88%, var(--a3) 0%, transparent 60%), radial-gradient(44% 38% at 16% 90%, var(--a4) 0%, transparent 58%), linear-gradient(160deg, var(--base) 0%, var(--base2) 52%, var(--base) 100%);
}
.gm-13 *,
.gm-13 *::before,
.gm-13 *::after {
box-sizing: border-box;
}
@supports (color: oklch(0.7 0.1 300)) {
.gm-13 {
--a1: oklch(0.68 0.19 280 / .62);
--a2: oklch(0.82 0.16 200 / .52);
--a3: oklch(0.74 0.19 5 / .5);
--a4: oklch(0.8 0.15 165 / .42);
--base: oklch(0.97 0.008 275);
--base2: oklch(0.93 0.015 285);
--accent: oklch(0.75 0.16 292);
}
}
.gm-13__vh {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
.gm-13__sr {
position: absolute;
width: 1px;
height: 1px;
opacity: 0;
pointer-events: none;
}
.gm-13__theme {
position: absolute;
inset-block-start: 1.15rem;
inset-inline-end: 1.15rem;
z-index: 8;
inline-size: 2.5rem;
block-size: 2.5rem;
display: grid;
place-items: center;
cursor: pointer;
border-radius: 999px;
color: var(--ink);
background: rgba(255,255,255,.14);
border: 1px solid var(--edge);
-webkit-backdrop-filter: blur(10px) saturate(160%);
backdrop-filter: blur(10px) saturate(160%);
box-shadow: inset 0 1px 0 var(--rim), 0 10px 24px -14px rgba(0,0,0,.7);
transition: scale .18s ease;
}
.gm-13__theme::after {
content: '';
position: absolute;
inset: -2px;
border-radius: inherit;
}
.gm-13__theme svg {
inline-size: 1.15rem;
block-size: 1.15rem;
}
.gm-13__theme:hover {
scale: 1.06;
}
.gm-13__sr:focus-visible + .gm-13__theme {
outline: 2px solid var(--ink);
outline-offset: 3px;
}
.gm-13__moon {
display: none;
}
.gm-13__stage {
min-height: 100vh;
min-height: 100svh;
display: grid;
place-items: center;
padding: clamp(1.25rem,4vw,3.5rem);
}
.gm-13__wrap {
inline-size: min(74rem,100%);
}
.gm-13__head {
display: grid;
justify-items: center;
gap: .85rem;
text-align: center;
margin-block-end: clamp(1.75rem,4vw,2.75rem);
}
.gm-13__eyebrow {
margin: 0;
font-family: var(--mono);
font-size: .72rem;
letter-spacing: .16em;
text-transform: uppercase;
color: var(--muted);
}
.gm-13__h {
margin: 0;
max-inline-size: 38rem;
font-size: clamp(1.85rem,4.4vw,2.9rem);
font-weight: 600;
letter-spacing: -.032em;
line-height: 1.06;
text-wrap: balance;
}
.gm-13__cycle {
display: inline-flex;
align-items: center;
gap: .25rem;
padding: .3rem;
border-radius: 999px;
background: rgba(255,255,255,.12);
border: 1px solid var(--edge);
-webkit-backdrop-filter: blur(16px) saturate(160%);
backdrop-filter: blur(16px) saturate(160%);
box-shadow: inset 0 1px 0 var(--rim);
}
.gm-13__seg {
display: inline-flex;
align-items: center;
gap: .4rem;
min-block-size: 2.5rem;
padding: .5rem 1.05rem;
border-radius: 999px;
cursor: pointer;
font-size: .92rem;
font-weight: 500;
color: var(--ink);
transition: background .18s ease, color .18s ease;
}
.gm-13__save {
padding: .1rem .35rem;
border-radius: .35rem;
font-family: var(--mono);
font-size: .66rem;
background: rgba(255,255,255,.18);
border: 1px solid var(--edge);
}
.gm-13:has(#gm-13-monthly:checked) .gm-13__seg[for="gm-13-monthly"],
.gm-13:has(#gm-13-yearly:checked) .gm-13__seg[for="gm-13-yearly"] {
background: rgba(255,255,255,.22);
box-shadow: inset 0 1px 0 var(--rim);
}
.gm-13__sr:focus-visible + .gm-13__seg {
outline: 2px solid var(--ink);
outline-offset: 2px;
}
.gm-13__grid {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: clamp(1rem,2vw,1.5rem);
grid-template-columns: repeat(auto-fit,minmax(16rem,1fr));
align-items: start;
}
.gm-13__tier {
--film: 14%;
--b: 20px;
position: relative;
display: flex;
flex-direction: column;
gap: .6rem;
padding: clamp(1.3rem,2.4vw,1.85rem);
border-radius: 1.6rem;
background: rgba(255,255,255,.14);
border: 1px solid var(--edge);
box-shadow: inset 0 1px 0 var(--rim), inset 0 -1px 0 var(--rim2), 0 30px 66px -30px rgba(0,0,0,.65);
transition: translate .25s cubic-bezier(.2,.7,.3,1);
}
@supports (background: color-mix(in oklab, white 10%, transparent)) {
.gm-13__tier {
background: color-mix(in oklab, var(--tint) var(--film), transparent);
}
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
.gm-13__tier {
-webkit-backdrop-filter: blur(var(--b)) saturate(175%);
backdrop-filter: blur(var(--b)) saturate(175%);
}
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
.gm-13__tier {
background: rgba(18,16,44,.9);
}
}
.gm-13__tier:hover {
translate: 0 -4px;
}
.gm-13__tier--featured {
--film: 22%;
--b: 28px;
box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(255,255,255,.18), 0 44px 90px -34px rgba(0,0,0,.75);
z-index: 1;
}
@media (min-width: 54rem) {
.gm-13__tier--featured {
margin-block: -1.25rem;
padding-block: 2.6rem;
}
}
.gm-13__badge {
position: absolute;
inset-block-start: 1.1rem;
inset-inline-end: 1.1rem;
margin: 0;
padding: .28rem .55rem;
border-radius: .5rem;
font-family: var(--mono);
font-size: .62rem;
letter-spacing: .12em;
text-transform: uppercase;
background: var(--accent);
color: #160c2c;
box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.gm-13__name {
margin: 0;
font-size: 1.15rem;
font-weight: 600;
letter-spacing: -.01em;
}
.gm-13__blurb {
margin: 0;
min-block-size: 2.6rem;
font-size: .9rem;
line-height: 1.45;
color: var(--muted);
text-wrap: pretty;
}
.gm-13__price {
margin: .3rem 0 0;
display: flex;
align-items: baseline;
gap: .1rem;
font-weight: 600;
letter-spacing: -.04em;
font-variant-numeric: tabular-nums;
font-size: clamp(2.4rem,5.4vw,3.1rem);
line-height: 1;
}
.gm-13__cur {
font-size: .42em;
translate: 0 -.85em;
opacity: .8;
}
.gm-13__per {
font-size: .28em;
font-weight: 500;
letter-spacing: 0;
opacity: .66;
}
.gm-13__billing {
margin: 0;
font-family: var(--mono);
font-size: .68rem;
letter-spacing: .04em;
color: var(--muted);
}
.gm-13__yr {
display: none;
}
.gm-13:has(#gm-13-yearly:checked) .gm-13__mo {
display: none;
}
.gm-13:has(#gm-13-yearly:checked) .gm-13__yr {
display: inline;
}
.gm-13__feats {
list-style: none;
margin: .6rem 0 auto;
padding: .9rem 0 0;
border-block-start: 1px solid var(--rim2);
display: grid;
gap: .55rem;
font-size: .9rem;
}
.gm-13__feats li {
display: grid;
grid-template-columns: 1.15rem 1fr;
gap: .6rem;
align-items: start;
line-height: 1.4;
color: var(--ink);
opacity: .9;
}
.gm-13__feats svg {
inline-size: 1.15rem;
block-size: 1.15rem;
margin-block-start: .1rem;
color: var(--accent);
}
.gm-13__cta {
margin-block-start: 1.1rem;
min-block-size: 2.75rem;
padding: .8rem 1.1rem;
border-radius: .9rem;
cursor: pointer;
font: inherit;
font-size: .94rem;
font-weight: 500;
color: var(--ink);
background: rgba(255,255,255,.13);
border: 1px solid var(--edge);
-webkit-backdrop-filter: blur(12px);
backdrop-filter: blur(12px);
box-shadow: inset 0 1px 0 var(--rim2);
transition: translate .18s ease, background .18s ease;
}
.gm-13__cta--primary {
color: #160c2c;
background: var(--accent);
border-color: transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 16px 34px -18px rgba(0,0,0,.7);
}
.gm-13__cta:hover {
translate: 0 -2px;
}
.gm-13__cta:focus-visible {
outline: 2px solid var(--ink);
outline-offset: 3px;
}
.gm-13__foot {
margin: clamp(1.4rem,3vw,2rem) 0 0;
text-align: center;
font-size: .85rem;
color: var(--muted);
}
.gm-13[data-theme="light"],
.gm-13:has(#gm-13-theme:checked) {
--a1: rgba(129,140,248,.6);
--a2: rgba(34,211,238,.5);
--a3: rgba(244,114,182,.5);
--a4: rgba(52,211,153,.4);
--base: #05070f;
--base2: #131033;
--ink: #f9fafe;
--muted: rgba(249,250,254,.7);
--rim: rgba(255,255,255,.5);
--rim2: rgba(255,255,255,.15);
--edge: rgba(255,255,255,.18);
--accent: #a78bfa;
}
.gm-13:has(#gm-13-theme:checked) .gm-13__sun {
display: none;
}
.gm-13:has(#gm-13-theme:checked) .gm-13__moon {
display: block;
}
.gm-13[data-theme="light"] .gm-13__badge,
.gm-13[data-theme="light"] .gm-13__cta--primary,
.gm-13:has(#gm-13-theme:checked) .gm-13__badge,
.gm-13:has(#gm-13-theme:checked) .gm-13__cta--primary {
color: #fff;
}
@media (prefers-reduced-motion: reduce) {
.gm-13 *,
.gm-13 *::before,
.gm-13 *::after {
transition: none !important;
animation: none !important;
}
}
@media (forced-colors: active) {
.gm-13__tier,
.gm-13__cta,
.gm-13__cycle,
.gm-13__theme,
.gm-13__badge {
border-color: CanvasText;
box-shadow: none;
-webkit-backdrop-filter: none;
backdrop-filter: none;
background: Canvas;
}
}
```Here's a working CSS Glassmorphism from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: Glassmorphism Pricing Table
Source: https://codefronts.com/design-styles/css-glassmorphism/pricing-glass/
A full three-tier table — not a single card — where the middle tier is elevated with a thicker film, a stronger rim and a badge, so the glass itself encodes hierarchy. The monthly/yearly switch is a radio group read with :has(): prices, savings copy and billing notes all change with zero JavaScript.
## HTML
```html
<div class="gm-13">
<input class="gm-13__sr" type="checkbox" id="gm-13-theme">
<label class="gm-13__theme" for="gm-13-theme" title="Switch theme">
<svg class="gm-13__sun" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="4.4" stroke="currentColor" stroke-width="1.7"/><path d="M12 2.6v2.3M12 19.1v2.3M2.6 12h2.3M19.1 12h2.3M5.3 5.3l1.7 1.7M17 17l1.7 1.7M18.7 5.3L17 7M7 17l-1.7 1.7" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/></svg>
<svg class="gm-13__moon" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M20.5 14.4A8.4 8.4 0 0 1 9.6 3.5 8.6 8.6 0 1 0 20.5 14.4Z" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/></svg>
<span class="gm-13__vh">Switch light or dark theme</span>
</label>
<div class="gm-13__stage">
<section class="gm-13__wrap" aria-labelledby="gm-13-h">
<header class="gm-13__head">
<p class="gm-13__eyebrow">Atlas Platform</p>
<h2 class="gm-13__h" id="gm-13-h">Pricing that scales with the surface area you ship</h2>
<div class="gm-13__cycle" role="group" aria-label="Billing period">
<input class="gm-13__sr" type="radio" name="gm-13-cycle" id="gm-13-monthly" value="monthly" checked>
<label class="gm-13__seg" for="gm-13-monthly">Monthly</label>
<input class="gm-13__sr" type="radio" name="gm-13-cycle" id="gm-13-yearly" value="yearly">
<label class="gm-13__seg" for="gm-13-yearly">Yearly <span class="gm-13__save">−20%</span></label>
</div>
</header>
<ul class="gm-13__grid">
<li class="gm-13__tier">
<h3 class="gm-13__name">Solo</h3>
<p class="gm-13__blurb">One developer, unlimited local previews.</p>
<p class="gm-13__price"><span class="gm-13__cur">$</span><span class="gm-13__mo">12</span><span class="gm-13__yr">10</span><span class="gm-13__per">/mo</span></p>
<p class="gm-13__billing"><span class="gm-13__mo">Billed monthly</span><span class="gm-13__yr">$115 billed yearly</span></p>
<ul class="gm-13__feats">
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>1 seat, 3 projects</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>100 GB bandwidth</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Community support</li>
</ul>
<button class="gm-13__cta" type="button">Start free</button>
</li>
<li class="gm-13__tier gm-13__tier--featured">
<p class="gm-13__badge">Most popular</p>
<h3 class="gm-13__name">Team</h3>
<p class="gm-13__blurb">Shared design tokens, preview links and review flows.</p>
<p class="gm-13__price"><span class="gm-13__cur">$</span><span class="gm-13__mo">29</span><span class="gm-13__yr">23</span><span class="gm-13__per">/mo</span></p>
<p class="gm-13__billing"><span class="gm-13__mo">Per seat, billed monthly</span><span class="gm-13__yr">$278 per seat, yearly</span></p>
<ul class="gm-13__feats">
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Up to 20 seats</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>1 TB bandwidth, edge cache</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Visual regression snapshots</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Priority support, 8h SLA</li>
</ul>
<button class="gm-13__cta gm-13__cta--primary" type="button">Start 14-day trial</button>
</li>
<li class="gm-13__tier">
<h3 class="gm-13__name">Scale</h3>
<p class="gm-13__blurb">SSO, audit trails and dedicated edge regions.</p>
<p class="gm-13__price"><span class="gm-13__cur">$</span><span class="gm-13__mo">99</span><span class="gm-13__yr">79</span><span class="gm-13__per">/mo</span></p>
<p class="gm-13__billing"><span class="gm-13__mo">Per seat, billed monthly</span><span class="gm-13__yr">$950 per seat, yearly</span></p>
<ul class="gm-13__feats">
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Unlimited seats and projects</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>SAML SSO and audit log</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Dedicated edge region</li>
<li><svg viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false"><path d="M5 12.5l4.3 4.1L19 7.4" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round"/></svg>Shared Slack channel</li>
</ul>
<button class="gm-13__cta" type="button">Talk to sales</button>
</li>
</ul>
<p class="gm-13__foot">Prices in USD, excluding tax. Cancel any time — usage above plan limits is billed at $0.09 per GB.</p>
</section>
</div>
</div>
```
## CSS
```css
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
.gm-13 {
--a1: rgba(165,180,252,.6);
--a2: rgba(103,232,249,.5);
--a3: rgba(249,168,212,.55);
--a4: rgba(110,231,183,.45);
--base: #f1f3fb;
--base2: #e3e8fd;
--ink: #0f1120;
--muted: rgba(15,17,32,.68);
--tint: #ffffff;
--accent: #7c3aed;
--rim: rgba(255,255,255,.95);
--rim2: rgba(255,255,255,.5);
--edge: rgba(15,17,32,.12);
--mono: 'Geist Mono',ui-monospace,'SFMono-Regular',Menlo,monospace;
width: 100%;
min-height: 100vh;
min-height: 100svh;
display: block;
position: relative;
overflow: hidden;
box-sizing: border-box;
color: var(--ink);
isolation: isolate;
font-family: 'Geist',ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;
background: radial-gradient(54% 46% at 12% 14%, var(--a1) 0%, transparent 62%), radial-gradient(46% 40% at 88% 16%, var(--a2) 0%, transparent 58%), radial-gradient(50% 44% at 80% 88%, var(--a3) 0%, transparent 60%), radial-gradient(44% 38% at 16% 90%, var(--a4) 0%, transparent 58%), linear-gradient(160deg, var(--base) 0%, var(--base2) 52%, var(--base) 100%);
}
.gm-13 *,
.gm-13 *::before,
.gm-13 *::after {
box-sizing: border-box;
}
@supports (color: oklch(0.7 0.1 300)) {
.gm-13 {
--a1: oklch(0.68 0.19 280 / .62);
--a2: oklch(0.82 0.16 200 / .52);
--a3: oklch(0.74 0.19 5 / .5);
--a4: oklch(0.8 0.15 165 / .42);
--base: oklch(0.97 0.008 275);
--base2: oklch(0.93 0.015 285);
--accent: oklch(0.75 0.16 292);
}
}
.gm-13__vh {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
.gm-13__sr {
position: absolute;
width: 1px;
height: 1px;
opacity: 0;
pointer-events: none;
}
.gm-13__theme {
position: absolute;
inset-block-start: 1.15rem;
inset-inline-end: 1.15rem;
z-index: 8;
inline-size: 2.5rem;
block-size: 2.5rem;
display: grid;
place-items: center;
cursor: pointer;
border-radius: 999px;
color: var(--ink);
background: rgba(255,255,255,.14);
border: 1px solid var(--edge);
-webkit-backdrop-filter: blur(10px) saturate(160%);
backdrop-filter: blur(10px) saturate(160%);
box-shadow: inset 0 1px 0 var(--rim), 0 10px 24px -14px rgba(0,0,0,.7);
transition: scale .18s ease;
}
.gm-13__theme::after {
content: '';
position: absolute;
inset: -2px;
border-radius: inherit;
}
.gm-13__theme svg {
inline-size: 1.15rem;
block-size: 1.15rem;
}
.gm-13__theme:hover {
scale: 1.06;
}
.gm-13__sr:focus-visible + .gm-13__theme {
outline: 2px solid var(--ink);
outline-offset: 3px;
}
.gm-13__moon {
display: none;
}
.gm-13__stage {
min-height: 100vh;
min-height: 100svh;
display: grid;
place-items: center;
padding: clamp(1.25rem,4vw,3.5rem);
}
.gm-13__wrap {
inline-size: min(74rem,100%);
}
.gm-13__head {
display: grid;
justify-items: center;
gap: .85rem;
text-align: center;
margin-block-end: clamp(1.75rem,4vw,2.75rem);
}
.gm-13__eyebrow {
margin: 0;
font-family: var(--mono);
font-size: .72rem;
letter-spacing: .16em;
text-transform: uppercase;
color: var(--muted);
}
.gm-13__h {
margin: 0;
max-inline-size: 38rem;
font-size: clamp(1.85rem,4.4vw,2.9rem);
font-weight: 600;
letter-spacing: -.032em;
line-height: 1.06;
text-wrap: balance;
}
.gm-13__cycle {
display: inline-flex;
align-items: center;
gap: .25rem;
padding: .3rem;
border-radius: 999px;
background: rgba(255,255,255,.12);
border: 1px solid var(--edge);
-webkit-backdrop-filter: blur(16px) saturate(160%);
backdrop-filter: blur(16px) saturate(160%);
box-shadow: inset 0 1px 0 var(--rim);
}
.gm-13__seg {
display: inline-flex;
align-items: center;
gap: .4rem;
min-block-size: 2.5rem;
padding: .5rem 1.05rem;
border-radius: 999px;
cursor: pointer;
font-size: .92rem;
font-weight: 500;
color: var(--ink);
transition: background .18s ease, color .18s ease;
}
.gm-13__save {
padding: .1rem .35rem;
border-radius: .35rem;
font-family: var(--mono);
font-size: .66rem;
background: rgba(255,255,255,.18);
border: 1px solid var(--edge);
}
.gm-13:has(#gm-13-monthly:checked) .gm-13__seg[for="gm-13-monthly"],
.gm-13:has(#gm-13-yearly:checked) .gm-13__seg[for="gm-13-yearly"] {
background: rgba(255,255,255,.22);
box-shadow: inset 0 1px 0 var(--rim);
}
.gm-13__sr:focus-visible + .gm-13__seg {
outline: 2px solid var(--ink);
outline-offset: 2px;
}
.gm-13__grid {
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: clamp(1rem,2vw,1.5rem);
grid-template-columns: repeat(auto-fit,minmax(16rem,1fr));
align-items: start;
}
.gm-13__tier {
--film: 14%;
--b: 20px;
position: relative;
display: flex;
flex-direction: column;
gap: .6rem;
padding: clamp(1.3rem,2.4vw,1.85rem);
border-radius: 1.6rem;
background: rgba(255,255,255,.14);
border: 1px solid var(--edge);
box-shadow: inset 0 1px 0 var(--rim), inset 0 -1px 0 var(--rim2), 0 30px 66px -30px rgba(0,0,0,.65);
transition: translate .25s cubic-bezier(.2,.7,.3,1);
}
@supports (background: color-mix(in oklab, white 10%, transparent)) {
.gm-13__tier {
background: color-mix(in oklab, var(--tint) var(--film), transparent);
}
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
.gm-13__tier {
-webkit-backdrop-filter: blur(var(--b)) saturate(175%);
backdrop-filter: blur(var(--b)) saturate(175%);
}
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
.gm-13__tier {
background: rgba(18,16,44,.9);
}
}
.gm-13__tier:hover {
translate: 0 -4px;
}
.gm-13__tier--featured {
--film: 22%;
--b: 28px;
box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(255,255,255,.18), 0 44px 90px -34px rgba(0,0,0,.75);
z-index: 1;
}
@media (min-width: 54rem) {
.gm-13__tier--featured {
margin-block: -1.25rem;
padding-block: 2.6rem;
}
}
.gm-13__badge {
position: absolute;
inset-block-start: 1.1rem;
inset-inline-end: 1.1rem;
margin: 0;
padding: .28rem .55rem;
border-radius: .5rem;
font-family: var(--mono);
font-size: .62rem;
letter-spacing: .12em;
text-transform: uppercase;
background: var(--accent);
color: #160c2c;
box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.gm-13__name {
margin: 0;
font-size: 1.15rem;
font-weight: 600;
letter-spacing: -.01em;
}
.gm-13__blurb {
margin: 0;
min-block-size: 2.6rem;
font-size: .9rem;
line-height: 1.45;
color: var(--muted);
text-wrap: pretty;
}
.gm-13__price {
margin: .3rem 0 0;
display: flex;
align-items: baseline;
gap: .1rem;
font-weight: 600;
letter-spacing: -.04em;
font-variant-numeric: tabular-nums;
font-size: clamp(2.4rem,5.4vw,3.1rem);
line-height: 1;
}
.gm-13__cur {
font-size: .42em;
translate: 0 -.85em;
opacity: .8;
}
.gm-13__per {
font-size: .28em;
font-weight: 500;
letter-spacing: 0;
opacity: .66;
}
.gm-13__billing {
margin: 0;
font-family: var(--mono);
font-size: .68rem;
letter-spacing: .04em;
color: var(--muted);
}
.gm-13__yr {
display: none;
}
.gm-13:has(#gm-13-yearly:checked) .gm-13__mo {
display: none;
}
.gm-13:has(#gm-13-yearly:checked) .gm-13__yr {
display: inline;
}
.gm-13__feats {
list-style: none;
margin: .6rem 0 auto;
padding: .9rem 0 0;
border-block-start: 1px solid var(--rim2);
display: grid;
gap: .55rem;
font-size: .9rem;
}
.gm-13__feats li {
display: grid;
grid-template-columns: 1.15rem 1fr;
gap: .6rem;
align-items: start;
line-height: 1.4;
color: var(--ink);
opacity: .9;
}
.gm-13__feats svg {
inline-size: 1.15rem;
block-size: 1.15rem;
margin-block-start: .1rem;
color: var(--accent);
}
.gm-13__cta {
margin-block-start: 1.1rem;
min-block-size: 2.75rem;
padding: .8rem 1.1rem;
border-radius: .9rem;
cursor: pointer;
font: inherit;
font-size: .94rem;
font-weight: 500;
color: var(--ink);
background: rgba(255,255,255,.13);
border: 1px solid var(--edge);
-webkit-backdrop-filter: blur(12px);
backdrop-filter: blur(12px);
box-shadow: inset 0 1px 0 var(--rim2);
transition: translate .18s ease, background .18s ease;
}
.gm-13__cta--primary {
color: #160c2c;
background: var(--accent);
border-color: transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 16px 34px -18px rgba(0,0,0,.7);
}
.gm-13__cta:hover {
translate: 0 -2px;
}
.gm-13__cta:focus-visible {
outline: 2px solid var(--ink);
outline-offset: 3px;
}
.gm-13__foot {
margin: clamp(1.4rem,3vw,2rem) 0 0;
text-align: center;
font-size: .85rem;
color: var(--muted);
}
.gm-13[data-theme="light"],
.gm-13:has(#gm-13-theme:checked) {
--a1: rgba(129,140,248,.6);
--a2: rgba(34,211,238,.5);
--a3: rgba(244,114,182,.5);
--a4: rgba(52,211,153,.4);
--base: #05070f;
--base2: #131033;
--ink: #f9fafe;
--muted: rgba(249,250,254,.7);
--rim: rgba(255,255,255,.5);
--rim2: rgba(255,255,255,.15);
--edge: rgba(255,255,255,.18);
--accent: #a78bfa;
}
.gm-13:has(#gm-13-theme:checked) .gm-13__sun {
display: none;
}
.gm-13:has(#gm-13-theme:checked) .gm-13__moon {
display: block;
}
.gm-13[data-theme="light"] .gm-13__badge,
.gm-13[data-theme="light"] .gm-13__cta--primary,
.gm-13:has(#gm-13-theme:checked) .gm-13__badge,
.gm-13:has(#gm-13-theme:checked) .gm-13__cta--primary {
color: #fff;
}
@media (prefers-reduced-motion: reduce) {
.gm-13 *,
.gm-13 *::before,
.gm-13 *::after {
transition: none !important;
animation: none !important;
}
}
@media (forced-colors: active) {
.gm-13__tier,
.gm-13__cta,
.gm-13__cycle,
.gm-13__theme,
.gm-13__badge {
border-color: CanvasText;
box-shadow: none;
-webkit-backdrop-filter: none;
backdrop-filter: none;
background: Canvas;
}
}
```How this works
Hierarchy through material, not colour. The featured tier does not get a different hue — it gets more glass: a thicker film, a heavier blur, a brighter rim and a deeper ambient shadow. That reads as physically closer to the viewer, which is exactly the message a recommended plan needs:
.gm-13__tier{ --film:14%; --b:20px; }
.gm-13__tier--featured{
--film:22%; --b:28px;
box-shadow:inset 0 1px 0 rgba(255,255,255,.6),
inset 0 -1px 0 rgba(255,255,255,.18),
0 44px 90px -34px rgba(0,0,0,.75);
}The billing switch is CSS-only. Two visually hidden radios live inside the segmented control; the scope root reads their state with :has() and swaps which price span is shown. Radios (not a checkbox) mean arrow-key navigation and a proper group announcement:
.gm-13__yr{ display:none; }
.gm-13:has(#gm-13-yearly:checked) .gm-13__mo{ display:none; }
.gm-13:has(#gm-13-yearly:checked) .gm-13__yr{ display:inline; }Prices must not jitter. Swapping $29 for $23 in a proportional font shifts every element after it. font-variant-numeric: tabular-nums fixes digit width so the switch feels instant instead of janky.
.gm-13__price{ font-variant-numeric:tabular-nums; }Everything sits over one ambient mesh, so all three columns blur the same source pixels — the tiers differ in material, never in backdrop.
Make it yours
- Add a fourth tier by copying a column; the grid is
auto-fitso nothing else changes. Drop the featured elevation past three columns — it stops reading as "one recommendation". - Retune hierarchy with two numbers:
--film(14% → 22%) and--b(20px → 28px) on the featured tier. - Wire real billing by reading
document.querySelector('input[name="gm-13-cycle"]:checked').value— the CSS needs no changes. - Swap the yearly discount by editing the
gm-13__yrspans and the savings pill; the switch logic is generic. - For enterprise rows, replace the price with a
Talk to salesbutton — the column layout tolerates a missing price. - Move the badge to the top-left by flipping
inset-inline-endtoinset-inline-start.
Gotchas — read before shipping
- Three stacked glass columns are three blur passes. On a landing page that is fine; inside a scrolling app shell, consider opaque cards.
- Never hide the inactive price with
visibility: hidden— it still occupies space and the column heights drift. Usedisplay: none. - Visually hidden radios must stay focusable;
display: noneremoves them from the tab order and breaks the switch for keyboard users. - The featured column's
scale()alternative multiplies its border width — prefer margin and padding for elevation so the 1px rim stays 1px. - Price text over glass frequently fails contrast at large sizes because designers lower its opacity. Keep prices at full ink.
- If you add a currency selector, remember that
:has()selectors multiply quickly — consider a data attribute on the root instead.
Browser support
| Chrome | Safari | Firefox | Edge |
|---|---|---|---|
| 114+ | 17.5+ | 121+ | 114+ |
Floor set by :has(), oklch(), color-mix(), backdrop-filter, text-wrap as this demo is written. The core technique itself goes back further — Chrome 105+.
:has() drives the billing switch and the theme toggle (Chrome 105 / Safari 15.4 / Firefox 121). backdrop-filter needs Chrome 76 / Safari 9 prefixed / Firefox 103, and color-mix() is gated with rgba() fallbacks.