03 / 29
All 29 in 29 Tailwind CSS Checkboxes
- 01Tailwind CSS Toggle Switch — iOS-Style SaaS Settings
- 02Tailwind Filter Chip Checkbox — Style Checkbox as Button
- 03Tailwind Pricing Plan Card Select — Checkbox-Style Selectable Cards
- 04Pure Tailwind CSS Accordion with Checkbox — No JavaScript
- 05Tailwind Indeterminate Checkbox — Select All with Tri-State
- 06Accessible Custom Checkbox in Tailwind CSS — WCAG Focus Ring
- 07Tailwind Slide Toggle with ON/OFF Labels — GPU translate3d
- 08Neon Glow Checkbox in Tailwind CSS — Dark Mode Gaming UI
- 09Animated SVG Checkmark in Tailwind CSS — stroke-dashoffset Draw
- 10Bouncy Checkbox Animation in Tailwind CSS — Spring cubic-bezier
- 11Glassmorphism Checkbox in Tailwind CSS — backdrop-blur Frosted Glass
- 12Neumorphism Checkbox in Tailwind CSS — Soft UI
- 13Liquid Fill Checkbox Animation in Tailwind CSS — Water Wave
- 14Rotating Ring Checkbox in Tailwind CSS — Spin-to-Check
- 15Brutalist Checkbox in Tailwind CSS — Neo-Brutalism Hard Shadow
- 16Animated Gradient Checkbox in Tailwind CSS — Rainbow Sweep
- 173D Flip Checkbox in Tailwind CSS — perspective & backface-hidden
- 18Material Ripple Checkbox in Tailwind CSS — State Layer & Wave
- 19Retro Pixel Art Checkbox in Tailwind CSS — 8-Bit Arcade Menu
- 20Tailwind CSS To-Do List Checkbox with Animated Strikethrough
- 21Gooey Blob Checkbox in Tailwind CSS — blur + contrast Filter
- 22Tailwind Dark Mode Toggle Switch — Sun & Moon, No JavaScript
- 23Pulse Ring Checkbox in Tailwind CSS — Live Status Indicator
- 24Tailwind CSS Dash-to-Check SVG Morph Checkbox
- 25Tri-State Checkbox in Tailwind CSS + JavaScript — Done / N/A / Unset
- 26Magnetic Hover Checkbox in Tailwind CSS + JavaScript
- 27Confetti Checkbox Animation in Tailwind CSS — Pure CSS Particle Burst
- 28Slide-In Label Checkbox in Tailwind CSS — Saved Tag Reveal
- 29Aurora Gradient Toggle Switch in Tailwind CSS — Premium Dark UI
Tailwind Pricing Plan Card Select — Checkbox-Style Selectable Cards
Selectable pricing cards that lift, outline and badge themselves on selection — all from has-checked: on the card label. Because plans are mutually exclusive, the port quietly swaps the original checkboxes for a named radio group: same look, correct semantics, arrow-key navigation for free.
Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time
Untitled UI React · Affiliate link
The code
<section class="tcb-03 w-full min-h-svh grid place-items-center bg-tcb03-bg px-5 py-14 font-tcb03-sans text-tcb03-ink selection:bg-tcb03-acc selection:text-white" aria-label="Pricing plan selector">
<fieldset class="w-full max-w-3xl">
<legend class="mb-6 w-full text-center text-2xl font-extrabold tracking-[-0.02em]">Pick your plan</legend>
<div class="grid gap-4 sm:grid-cols-3">
<label class="group relative flex cursor-pointer flex-col gap-1.5 rounded-2xl border-2 border-tcb03-line bg-white px-5 py-5.5 shadow-tcb03-rest transition duration-300 ease-[cubic-bezier(.2,.8,.2,1)] hover:border-tcb03-hover has-checked:-translate-y-1 has-checked:border-tcb03-acc has-checked:shadow-tcb03-lift has-focus-visible:outline-3 has-focus-visible:outline-offset-3 has-focus-visible:outline-tcb03-acc motion-reduce:transition-none motion-reduce:has-checked:translate-y-0"><input type="radio" name="tcb03-plan" class="peer sr-only">
<span aria-hidden="true" class="absolute right-3.5 top-3.5 grid size-[22px] place-items-center rounded-full border-2 border-tcb03-line bg-white text-white transition-colors duration-200 peer-checked:border-tcb03-acc peer-checked:bg-tcb03-acc"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="size-3 scale-40 opacity-0 transition duration-200 group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span>
<span class="text-[13px] font-bold uppercase tracking-[0.06em] text-tcb03-mut">Starter</span>
<span class="text-[32px] font-extrabold tabular-nums tracking-[-0.02em]">$9<span class="text-sm font-semibold text-tcb03-mut">/mo</span></span>
<span class="mt-0.5 text-[13px] leading-normal text-tcb03-mut">3 projects · 1 seat · community support</span>
</label>
<label class="group relative flex cursor-pointer flex-col gap-1.5 rounded-2xl border-2 border-tcb03-line bg-white px-5 py-5.5 shadow-tcb03-rest transition duration-300 ease-[cubic-bezier(.2,.8,.2,1)] hover:border-tcb03-hover has-checked:-translate-y-1 has-checked:border-tcb03-acc has-checked:shadow-tcb03-lift has-focus-visible:outline-3 has-focus-visible:outline-offset-3 has-focus-visible:outline-tcb03-acc motion-reduce:transition-none motion-reduce:has-checked:translate-y-0"><input type="radio" name="tcb03-plan" class="peer sr-only" checked>
<span aria-hidden="true" class="absolute right-3.5 top-3.5 grid size-[22px] place-items-center rounded-full border-2 border-tcb03-line bg-white text-white transition-colors duration-200 peer-checked:border-tcb03-acc peer-checked:bg-tcb03-acc"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="size-3 scale-40 opacity-0 transition duration-200 group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span>
<span class="absolute -top-2.5 left-5 rounded-full bg-tcb03-acc px-2.5 py-0.5 text-[10.5px] font-bold uppercase tracking-[0.1em] text-white">Popular</span>
<span class="text-[13px] font-bold uppercase tracking-[0.06em] text-tcb03-mut">Growth</span>
<span class="text-[32px] font-extrabold tabular-nums tracking-[-0.02em]">$29<span class="text-sm font-semibold text-tcb03-mut">/mo</span></span>
<span class="mt-0.5 text-[13px] leading-normal text-tcb03-mut">Unlimited projects · 5 seats · priority support</span>
</label>
<label class="group relative flex cursor-pointer flex-col gap-1.5 rounded-2xl border-2 border-tcb03-line bg-white px-5 py-5.5 shadow-tcb03-rest transition duration-300 ease-[cubic-bezier(.2,.8,.2,1)] hover:border-tcb03-hover has-checked:-translate-y-1 has-checked:border-tcb03-acc has-checked:shadow-tcb03-lift has-focus-visible:outline-3 has-focus-visible:outline-offset-3 has-focus-visible:outline-tcb03-acc motion-reduce:transition-none motion-reduce:has-checked:translate-y-0"><input type="radio" name="tcb03-plan" class="peer sr-only">
<span aria-hidden="true" class="absolute right-3.5 top-3.5 grid size-[22px] place-items-center rounded-full border-2 border-tcb03-line bg-white text-white transition-colors duration-200 peer-checked:border-tcb03-acc peer-checked:bg-tcb03-acc"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="size-3 scale-40 opacity-0 transition duration-200 group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span>
<span class="text-[13px] font-bold uppercase tracking-[0.06em] text-tcb03-mut">Scale</span>
<span class="text-[32px] font-extrabold tabular-nums tracking-[-0.02em]">$79<span class="text-sm font-semibold text-tcb03-mut">/mo</span></span>
<span class="mt-0.5 text-[13px] leading-normal text-tcb03-mut">SSO · audit logs · dedicated CSM</span>
</label>
</div>
</fieldset>
</section><section class="tcb-03 w-full min-h-svh grid place-items-center bg-tcb03-bg px-5 py-14 font-tcb03-sans text-tcb03-ink selection:bg-tcb03-acc selection:text-white" aria-label="Pricing plan selector">
<fieldset class="w-full max-w-3xl">
<legend class="mb-6 w-full text-center text-2xl font-extrabold tracking-[-0.02em]">Pick your plan</legend>
<div class="grid gap-4 sm:grid-cols-3">
<label class="group relative flex cursor-pointer flex-col gap-1.5 rounded-2xl border-2 border-tcb03-line bg-white px-5 py-5.5 shadow-tcb03-rest transition duration-300 ease-[cubic-bezier(.2,.8,.2,1)] hover:border-tcb03-hover has-checked:-translate-y-1 has-checked:border-tcb03-acc has-checked:shadow-tcb03-lift has-focus-visible:outline-3 has-focus-visible:outline-offset-3 has-focus-visible:outline-tcb03-acc motion-reduce:transition-none motion-reduce:has-checked:translate-y-0"><input type="radio" name="tcb03-plan" class="peer sr-only">
<span aria-hidden="true" class="absolute right-3.5 top-3.5 grid size-[22px] place-items-center rounded-full border-2 border-tcb03-line bg-white text-white transition-colors duration-200 peer-checked:border-tcb03-acc peer-checked:bg-tcb03-acc"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="size-3 scale-40 opacity-0 transition duration-200 group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span>
<span class="text-[13px] font-bold uppercase tracking-[0.06em] text-tcb03-mut">Starter</span>
<span class="text-[32px] font-extrabold tabular-nums tracking-[-0.02em]">$9<span class="text-sm font-semibold text-tcb03-mut">/mo</span></span>
<span class="mt-0.5 text-[13px] leading-normal text-tcb03-mut">3 projects · 1 seat · community support</span>
</label>
<label class="group relative flex cursor-pointer flex-col gap-1.5 rounded-2xl border-2 border-tcb03-line bg-white px-5 py-5.5 shadow-tcb03-rest transition duration-300 ease-[cubic-bezier(.2,.8,.2,1)] hover:border-tcb03-hover has-checked:-translate-y-1 has-checked:border-tcb03-acc has-checked:shadow-tcb03-lift has-focus-visible:outline-3 has-focus-visible:outline-offset-3 has-focus-visible:outline-tcb03-acc motion-reduce:transition-none motion-reduce:has-checked:translate-y-0"><input type="radio" name="tcb03-plan" class="peer sr-only" checked>
<span aria-hidden="true" class="absolute right-3.5 top-3.5 grid size-[22px] place-items-center rounded-full border-2 border-tcb03-line bg-white text-white transition-colors duration-200 peer-checked:border-tcb03-acc peer-checked:bg-tcb03-acc"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="size-3 scale-40 opacity-0 transition duration-200 group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span>
<span class="absolute -top-2.5 left-5 rounded-full bg-tcb03-acc px-2.5 py-0.5 text-[10.5px] font-bold uppercase tracking-[0.1em] text-white">Popular</span>
<span class="text-[13px] font-bold uppercase tracking-[0.06em] text-tcb03-mut">Growth</span>
<span class="text-[32px] font-extrabold tabular-nums tracking-[-0.02em]">$29<span class="text-sm font-semibold text-tcb03-mut">/mo</span></span>
<span class="mt-0.5 text-[13px] leading-normal text-tcb03-mut">Unlimited projects · 5 seats · priority support</span>
</label>
<label class="group relative flex cursor-pointer flex-col gap-1.5 rounded-2xl border-2 border-tcb03-line bg-white px-5 py-5.5 shadow-tcb03-rest transition duration-300 ease-[cubic-bezier(.2,.8,.2,1)] hover:border-tcb03-hover has-checked:-translate-y-1 has-checked:border-tcb03-acc has-checked:shadow-tcb03-lift has-focus-visible:outline-3 has-focus-visible:outline-offset-3 has-focus-visible:outline-tcb03-acc motion-reduce:transition-none motion-reduce:has-checked:translate-y-0"><input type="radio" name="tcb03-plan" class="peer sr-only">
<span aria-hidden="true" class="absolute right-3.5 top-3.5 grid size-[22px] place-items-center rounded-full border-2 border-tcb03-line bg-white text-white transition-colors duration-200 peer-checked:border-tcb03-acc peer-checked:bg-tcb03-acc"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="size-3 scale-40 opacity-0 transition duration-200 group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span>
<span class="text-[13px] font-bold uppercase tracking-[0.06em] text-tcb03-mut">Scale</span>
<span class="text-[32px] font-extrabold tabular-nums tracking-[-0.02em]">$79<span class="text-sm font-semibold text-tcb03-mut">/mo</span></span>
<span class="mt-0.5 text-[13px] leading-normal text-tcb03-mut">SSO · audit logs · dedicated CSM</span>
</label>
</div>
</fieldset>
</section>@import "tailwindcss";
@theme {
--color-tcb03-bg: #f5f4f8;
--color-tcb03-bg: oklch(0.97 0.006 295);
--color-tcb03-ink: #22203a;
--color-tcb03-ink: oklch(0.25 0.04 290);
--color-tcb03-mut: #625f78;
--color-tcb03-mut: oklch(0.5 0.03 290);
--color-tcb03-line: #e5e4ee;
--color-tcb03-line: oklch(0.92 0.01 290);
--color-tcb03-hover: #c7c4dd;
--color-tcb03-hover: oklch(0.83 0.03 290);
--color-tcb03-acc: #6a3fd6;
--color-tcb03-acc: oklch(0.52 0.2 288);
--font-tcb03-sans: 'Bricolage Grotesque', system-ui, sans-serif;
--shadow-tcb03-rest: 0 10px 26px -22px rgb(30 20 60 / 0.6);
--shadow-tcb03-lift: 0 22px 40px -24px rgb(80 40 180 / 0.55);
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
stage is sized before the browser build compiles. */
.tcb-03 {
width: 100%;
min-height: 100svh;
}@import "tailwindcss";
@theme {
--color-tcb03-bg: #f5f4f8;
--color-tcb03-bg: oklch(0.97 0.006 295);
--color-tcb03-ink: #22203a;
--color-tcb03-ink: oklch(0.25 0.04 290);
--color-tcb03-mut: #625f78;
--color-tcb03-mut: oklch(0.5 0.03 290);
--color-tcb03-line: #e5e4ee;
--color-tcb03-line: oklch(0.92 0.01 290);
--color-tcb03-hover: #c7c4dd;
--color-tcb03-hover: oklch(0.83 0.03 290);
--color-tcb03-acc: #6a3fd6;
--color-tcb03-acc: oklch(0.52 0.2 288);
--font-tcb03-sans: 'Bricolage Grotesque', system-ui, sans-serif;
--shadow-tcb03-rest: 0 10px 26px -22px rgb(30 20 60 / 0.6);
--shadow-tcb03-lift: 0 22px 40px -24px rgb(80 40 180 / 0.55);
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
stage is sized before the browser build compiles. */
.tcb-03 {
width: 100%;
min-height: 100svh;
}Setup — do this once per project
Skip this if your project already runs Tailwind v4.
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>Compiles in the browser — perfect for a CodePen or a quick test, not for production.
npm install tailwindcss @tailwindcss/vite
npm install tailwindcss @tailwindcss/vite// vite.config.js ("type": "module" in package.json)
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [tailwindcss()],
})// vite.config.js ("type": "module" in package.json)
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [tailwindcss()],
})Any v4 setup works — Vite, PostCSS or the CLI. Nothing in this demo is bundler-specific.
@import "tailwindcss";
@theme {
--color-tcb03-bg: #f5f4f8;
--color-tcb03-bg: oklch(0.97 0.006 295);
--color-tcb03-ink: #22203a;
--color-tcb03-ink: oklch(0.25 0.04 290);
--color-tcb03-mut: #625f78;
--color-tcb03-mut: oklch(0.5 0.03 290);
--color-tcb03-line: #e5e4ee;
--color-tcb03-line: oklch(0.92 0.01 290);
--color-tcb03-hover: #c7c4dd;
--color-tcb03-hover: oklch(0.83 0.03 290);
--color-tcb03-acc: #6a3fd6;
--color-tcb03-acc: oklch(0.52 0.2 288);
--font-tcb03-sans: 'Bricolage Grotesque', system-ui, sans-serif;
--shadow-tcb03-rest: 0 10px 26px -22px rgb(30 20 60 / 0.6);
--shadow-tcb03-lift: 0 22px 40px -24px rgb(80 40 180 / 0.55);
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
stage is sized before the browser build compiles. */
.tcb-03 {
width: 100%;
min-height: 100svh;
}@import "tailwindcss";
@theme {
--color-tcb03-bg: #f5f4f8;
--color-tcb03-bg: oklch(0.97 0.006 295);
--color-tcb03-ink: #22203a;
--color-tcb03-ink: oklch(0.25 0.04 290);
--color-tcb03-mut: #625f78;
--color-tcb03-mut: oklch(0.5 0.03 290);
--color-tcb03-line: #e5e4ee;
--color-tcb03-line: oklch(0.92 0.01 290);
--color-tcb03-hover: #c7c4dd;
--color-tcb03-hover: oklch(0.83 0.03 290);
--color-tcb03-acc: #6a3fd6;
--color-tcb03-acc: oklch(0.52 0.2 288);
--font-tcb03-sans: 'Bricolage Grotesque', system-ui, sans-serif;
--shadow-tcb03-rest: 0 10px 26px -22px rgb(30 20 60 / 0.6);
--shadow-tcb03-lift: 0 22px 40px -24px rgb(80 40 180 / 0.55);
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
stage is sized before the browser build compiles. */
.tcb-03 {
width: 100%;
min-height: 100svh;
}<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&display=swap">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&display=swap">What changed in the port
Which parts became utilities, which stayed CSS, and why.
.cb-03__card:has(:checked)— border, translate and shadow — became threehas-checked:utilities; the badge'sinput:checked ~rule becamepeer-checked:.- The
@media (max-width:640px)single-column fallback inverted into the mobile-firstsm:grid-cols-3. - UI upgrade from the CSS original: plans are now a radio group — the original let users select all three tiers at once. A visible legend names the choice.
- UI upgrade: muted feature copy rose from
#6f6c83(4.9:1) and#9b98ad(2.7:1) to oneoklch(0.5)token (6.2:1), and prices usetabular-nums.
Here's a working CSS demo 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: Tailwind Pricing Plan Card Select — Checkbox-Style Selectable Cards
Source: https://codefronts.com/components/tailwind-css-checkboxes/tailwind-pricing-plan-card-select/
Selectable pricing cards that lift, outline and badge themselves on selection — all from has-checked: on the card label. Because plans are mutually exclusive, the port quietly swaps the original checkboxes for a named radio group: same look, correct semantics, arrow-key navigation for free.
## HTML
```html
<section class="tcb-03 w-full min-h-svh grid place-items-center bg-tcb03-bg px-5 py-14 font-tcb03-sans text-tcb03-ink selection:bg-tcb03-acc selection:text-white" aria-label="Pricing plan selector">
<fieldset class="w-full max-w-3xl">
<legend class="mb-6 w-full text-center text-2xl font-extrabold tracking-[-0.02em]">Pick your plan</legend>
<div class="grid gap-4 sm:grid-cols-3">
<label class="group relative flex cursor-pointer flex-col gap-1.5 rounded-2xl border-2 border-tcb03-line bg-white px-5 py-5.5 shadow-tcb03-rest transition duration-300 ease-[cubic-bezier(.2,.8,.2,1)] hover:border-tcb03-hover has-checked:-translate-y-1 has-checked:border-tcb03-acc has-checked:shadow-tcb03-lift has-focus-visible:outline-3 has-focus-visible:outline-offset-3 has-focus-visible:outline-tcb03-acc motion-reduce:transition-none motion-reduce:has-checked:translate-y-0"><input type="radio" name="tcb03-plan" class="peer sr-only">
<span aria-hidden="true" class="absolute right-3.5 top-3.5 grid size-[22px] place-items-center rounded-full border-2 border-tcb03-line bg-white text-white transition-colors duration-200 peer-checked:border-tcb03-acc peer-checked:bg-tcb03-acc"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="size-3 scale-40 opacity-0 transition duration-200 group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span>
<span class="text-[13px] font-bold uppercase tracking-[0.06em] text-tcb03-mut">Starter</span>
<span class="text-[32px] font-extrabold tabular-nums tracking-[-0.02em]">$9<span class="text-sm font-semibold text-tcb03-mut">/mo</span></span>
<span class="mt-0.5 text-[13px] leading-normal text-tcb03-mut">3 projects · 1 seat · community support</span>
</label>
<label class="group relative flex cursor-pointer flex-col gap-1.5 rounded-2xl border-2 border-tcb03-line bg-white px-5 py-5.5 shadow-tcb03-rest transition duration-300 ease-[cubic-bezier(.2,.8,.2,1)] hover:border-tcb03-hover has-checked:-translate-y-1 has-checked:border-tcb03-acc has-checked:shadow-tcb03-lift has-focus-visible:outline-3 has-focus-visible:outline-offset-3 has-focus-visible:outline-tcb03-acc motion-reduce:transition-none motion-reduce:has-checked:translate-y-0"><input type="radio" name="tcb03-plan" class="peer sr-only" checked>
<span aria-hidden="true" class="absolute right-3.5 top-3.5 grid size-[22px] place-items-center rounded-full border-2 border-tcb03-line bg-white text-white transition-colors duration-200 peer-checked:border-tcb03-acc peer-checked:bg-tcb03-acc"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="size-3 scale-40 opacity-0 transition duration-200 group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span>
<span class="absolute -top-2.5 left-5 rounded-full bg-tcb03-acc px-2.5 py-0.5 text-[10.5px] font-bold uppercase tracking-[0.1em] text-white">Popular</span>
<span class="text-[13px] font-bold uppercase tracking-[0.06em] text-tcb03-mut">Growth</span>
<span class="text-[32px] font-extrabold tabular-nums tracking-[-0.02em]">$29<span class="text-sm font-semibold text-tcb03-mut">/mo</span></span>
<span class="mt-0.5 text-[13px] leading-normal text-tcb03-mut">Unlimited projects · 5 seats · priority support</span>
</label>
<label class="group relative flex cursor-pointer flex-col gap-1.5 rounded-2xl border-2 border-tcb03-line bg-white px-5 py-5.5 shadow-tcb03-rest transition duration-300 ease-[cubic-bezier(.2,.8,.2,1)] hover:border-tcb03-hover has-checked:-translate-y-1 has-checked:border-tcb03-acc has-checked:shadow-tcb03-lift has-focus-visible:outline-3 has-focus-visible:outline-offset-3 has-focus-visible:outline-tcb03-acc motion-reduce:transition-none motion-reduce:has-checked:translate-y-0"><input type="radio" name="tcb03-plan" class="peer sr-only">
<span aria-hidden="true" class="absolute right-3.5 top-3.5 grid size-[22px] place-items-center rounded-full border-2 border-tcb03-line bg-white text-white transition-colors duration-200 peer-checked:border-tcb03-acc peer-checked:bg-tcb03-acc"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="size-3 scale-40 opacity-0 transition duration-200 group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span>
<span class="text-[13px] font-bold uppercase tracking-[0.06em] text-tcb03-mut">Scale</span>
<span class="text-[32px] font-extrabold tabular-nums tracking-[-0.02em]">$79<span class="text-sm font-semibold text-tcb03-mut">/mo</span></span>
<span class="mt-0.5 text-[13px] leading-normal text-tcb03-mut">SSO · audit logs · dedicated CSM</span>
</label>
</div>
</fieldset>
</section>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-tcb03-bg: #f5f4f8;
--color-tcb03-bg: oklch(0.97 0.006 295);
--color-tcb03-ink: #22203a;
--color-tcb03-ink: oklch(0.25 0.04 290);
--color-tcb03-mut: #625f78;
--color-tcb03-mut: oklch(0.5 0.03 290);
--color-tcb03-line: #e5e4ee;
--color-tcb03-line: oklch(0.92 0.01 290);
--color-tcb03-hover: #c7c4dd;
--color-tcb03-hover: oklch(0.83 0.03 290);
--color-tcb03-acc: #6a3fd6;
--color-tcb03-acc: oklch(0.52 0.2 288);
--font-tcb03-sans: 'Bricolage Grotesque', system-ui, sans-serif;
--shadow-tcb03-rest: 0 10px 26px -22px rgb(30 20 60 / 0.6);
--shadow-tcb03-lift: 0 22px 40px -24px rgb(80 40 180 / 0.55);
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
stage is sized before the browser build compiles. */
.tcb-03 {
width: 100%;
min-height: 100svh;
}
```Here's a working CSS demo 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: Tailwind Pricing Plan Card Select — Checkbox-Style Selectable Cards
Source: https://codefronts.com/components/tailwind-css-checkboxes/tailwind-pricing-plan-card-select/
Selectable pricing cards that lift, outline and badge themselves on selection — all from has-checked: on the card label. Because plans are mutually exclusive, the port quietly swaps the original checkboxes for a named radio group: same look, correct semantics, arrow-key navigation for free.
## HTML
```html
<section class="tcb-03 w-full min-h-svh grid place-items-center bg-tcb03-bg px-5 py-14 font-tcb03-sans text-tcb03-ink selection:bg-tcb03-acc selection:text-white" aria-label="Pricing plan selector">
<fieldset class="w-full max-w-3xl">
<legend class="mb-6 w-full text-center text-2xl font-extrabold tracking-[-0.02em]">Pick your plan</legend>
<div class="grid gap-4 sm:grid-cols-3">
<label class="group relative flex cursor-pointer flex-col gap-1.5 rounded-2xl border-2 border-tcb03-line bg-white px-5 py-5.5 shadow-tcb03-rest transition duration-300 ease-[cubic-bezier(.2,.8,.2,1)] hover:border-tcb03-hover has-checked:-translate-y-1 has-checked:border-tcb03-acc has-checked:shadow-tcb03-lift has-focus-visible:outline-3 has-focus-visible:outline-offset-3 has-focus-visible:outline-tcb03-acc motion-reduce:transition-none motion-reduce:has-checked:translate-y-0"><input type="radio" name="tcb03-plan" class="peer sr-only">
<span aria-hidden="true" class="absolute right-3.5 top-3.5 grid size-[22px] place-items-center rounded-full border-2 border-tcb03-line bg-white text-white transition-colors duration-200 peer-checked:border-tcb03-acc peer-checked:bg-tcb03-acc"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="size-3 scale-40 opacity-0 transition duration-200 group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span>
<span class="text-[13px] font-bold uppercase tracking-[0.06em] text-tcb03-mut">Starter</span>
<span class="text-[32px] font-extrabold tabular-nums tracking-[-0.02em]">$9<span class="text-sm font-semibold text-tcb03-mut">/mo</span></span>
<span class="mt-0.5 text-[13px] leading-normal text-tcb03-mut">3 projects · 1 seat · community support</span>
</label>
<label class="group relative flex cursor-pointer flex-col gap-1.5 rounded-2xl border-2 border-tcb03-line bg-white px-5 py-5.5 shadow-tcb03-rest transition duration-300 ease-[cubic-bezier(.2,.8,.2,1)] hover:border-tcb03-hover has-checked:-translate-y-1 has-checked:border-tcb03-acc has-checked:shadow-tcb03-lift has-focus-visible:outline-3 has-focus-visible:outline-offset-3 has-focus-visible:outline-tcb03-acc motion-reduce:transition-none motion-reduce:has-checked:translate-y-0"><input type="radio" name="tcb03-plan" class="peer sr-only" checked>
<span aria-hidden="true" class="absolute right-3.5 top-3.5 grid size-[22px] place-items-center rounded-full border-2 border-tcb03-line bg-white text-white transition-colors duration-200 peer-checked:border-tcb03-acc peer-checked:bg-tcb03-acc"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="size-3 scale-40 opacity-0 transition duration-200 group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span>
<span class="absolute -top-2.5 left-5 rounded-full bg-tcb03-acc px-2.5 py-0.5 text-[10.5px] font-bold uppercase tracking-[0.1em] text-white">Popular</span>
<span class="text-[13px] font-bold uppercase tracking-[0.06em] text-tcb03-mut">Growth</span>
<span class="text-[32px] font-extrabold tabular-nums tracking-[-0.02em]">$29<span class="text-sm font-semibold text-tcb03-mut">/mo</span></span>
<span class="mt-0.5 text-[13px] leading-normal text-tcb03-mut">Unlimited projects · 5 seats · priority support</span>
</label>
<label class="group relative flex cursor-pointer flex-col gap-1.5 rounded-2xl border-2 border-tcb03-line bg-white px-5 py-5.5 shadow-tcb03-rest transition duration-300 ease-[cubic-bezier(.2,.8,.2,1)] hover:border-tcb03-hover has-checked:-translate-y-1 has-checked:border-tcb03-acc has-checked:shadow-tcb03-lift has-focus-visible:outline-3 has-focus-visible:outline-offset-3 has-focus-visible:outline-tcb03-acc motion-reduce:transition-none motion-reduce:has-checked:translate-y-0"><input type="radio" name="tcb03-plan" class="peer sr-only">
<span aria-hidden="true" class="absolute right-3.5 top-3.5 grid size-[22px] place-items-center rounded-full border-2 border-tcb03-line bg-white text-white transition-colors duration-200 peer-checked:border-tcb03-acc peer-checked:bg-tcb03-acc"><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="size-3 scale-40 opacity-0 transition duration-200 group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span>
<span class="text-[13px] font-bold uppercase tracking-[0.06em] text-tcb03-mut">Scale</span>
<span class="text-[32px] font-extrabold tabular-nums tracking-[-0.02em]">$79<span class="text-sm font-semibold text-tcb03-mut">/mo</span></span>
<span class="mt-0.5 text-[13px] leading-normal text-tcb03-mut">SSO · audit logs · dedicated CSM</span>
</label>
</div>
</fieldset>
</section>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-tcb03-bg: #f5f4f8;
--color-tcb03-bg: oklch(0.97 0.006 295);
--color-tcb03-ink: #22203a;
--color-tcb03-ink: oklch(0.25 0.04 290);
--color-tcb03-mut: #625f78;
--color-tcb03-mut: oklch(0.5 0.03 290);
--color-tcb03-line: #e5e4ee;
--color-tcb03-line: oklch(0.92 0.01 290);
--color-tcb03-hover: #c7c4dd;
--color-tcb03-hover: oklch(0.83 0.03 290);
--color-tcb03-acc: #6a3fd6;
--color-tcb03-acc: oklch(0.52 0.2 288);
--font-tcb03-sans: 'Bricolage Grotesque', system-ui, sans-serif;
--shadow-tcb03-rest: 0 10px 26px -22px rgb(30 20 60 / 0.6);
--shadow-tcb03-lift: 0 22px 40px -24px rgb(80 40 180 / 0.55);
}
/* Root rule: the full-bleed contract, stated in CSS as well as in the markup's utilities, so the
stage is sized before the browser build compiles. */
.tcb-03 {
width: 100%;
min-height: 100svh;
}
```How this works
A card is a label. Every visual — border, lift, shadow — keys off has-checked: on the card itself, so the whole surface is the click target.
Checkbox look, radio behaviour. A pricing tier is single-choice. The original let users tick all three plans; here a shared name makes the browser enforce one, and arrow keys move between cards.
The badge is the peer's next sibling, so peer-checked: fills it; the tick inside reads from the card with group-has-checked:.
Make it yours
- Add-ons instead of plans: switch back to
type="checkbox"— every utility still works. - Re-theme:
--color-tcb03-accdrives border, badge, tag and glow. - Horizontal list:
sm:grid-cols-1+flex-rowon the card for a compact plan list. - No lift: drop
has-checked:-translate-y-1for flat dashboard layouts.
Gotchas — read before shipping
- Radios can't be unchecked by clicking again — that's correct for plans, wrong for add-ons.
- Keep the
motion-reduce:has-checked:translate-y-0guard so the lift doesn't animate for vestibular-sensitive users. - The ring sits on the card via
has-focus-visible:; the badge doesn't need its own.
Browser support
| Chrome | Safari | Firefox | Edge |
|---|---|---|---|
| 111+ | 16.4+ | 128+ | 111+ |
:has() for the card styles needs Firefox 121+; older engines still show the badge state.