29 Tailwind CSS Checkboxes
18 / 29

All 29 in 29 Tailwind CSS Checkboxes

  1. 01Tailwind CSS Toggle Switch — iOS-Style SaaS Settings
  2. 02Tailwind Filter Chip Checkbox — Style Checkbox as Button
  3. 03Tailwind Pricing Plan Card Select — Checkbox-Style Selectable Cards
  4. 04Pure Tailwind CSS Accordion with Checkbox — No JavaScript
  5. 05Tailwind Indeterminate Checkbox — Select All with Tri-State
  6. 06Accessible Custom Checkbox in Tailwind CSS — WCAG Focus Ring
  7. 07Tailwind Slide Toggle with ON/OFF Labels — GPU translate3d
  8. 08Neon Glow Checkbox in Tailwind CSS — Dark Mode Gaming UI
  9. 09Animated SVG Checkmark in Tailwind CSS — stroke-dashoffset Draw
  10. 10Bouncy Checkbox Animation in Tailwind CSS — Spring cubic-bezier
  11. 11Glassmorphism Checkbox in Tailwind CSS — backdrop-blur Frosted Glass
  12. 12Neumorphism Checkbox in Tailwind CSS — Soft UI
  13. 13Liquid Fill Checkbox Animation in Tailwind CSS — Water Wave
  14. 14Rotating Ring Checkbox in Tailwind CSS — Spin-to-Check
  15. 15Brutalist Checkbox in Tailwind CSS — Neo-Brutalism Hard Shadow
  16. 16Animated Gradient Checkbox in Tailwind CSS — Rainbow Sweep
  17. 173D Flip Checkbox in Tailwind CSS — perspective & backface-hidden
  18. 18Material Ripple Checkbox in Tailwind CSS — State Layer & Wave
  19. 19Retro Pixel Art Checkbox in Tailwind CSS — 8-Bit Arcade Menu
  20. 20Tailwind CSS To-Do List Checkbox with Animated Strikethrough
  21. 21Gooey Blob Checkbox in Tailwind CSS — blur + contrast Filter
  22. 22Tailwind Dark Mode Toggle Switch — Sun & Moon, No JavaScript
  23. 23Pulse Ring Checkbox in Tailwind CSS — Live Status Indicator
  24. 24Tailwind CSS Dash-to-Check SVG Morph Checkbox
  25. 25Tri-State Checkbox in Tailwind CSS + JavaScript — Done / N/A / Unset
  26. 26Magnetic Hover Checkbox in Tailwind CSS + JavaScript
  27. 27Confetti Checkbox Animation in Tailwind CSS — Pure CSS Particle Burst
  28. 28Slide-In Label Checkbox in Tailwind CSS — Saved Tag Reveal
  29. 29Aurora Gradient Toggle Switch in Tailwind CSS — Premium Dark UI
Pure TailwindMIT licensed

Material Ripple Checkbox in Tailwind CSS — State Layer & Wave

Material-style checkboxes with the halo done right: a 40px circular state layer sits behind the box, tints on hover and focus, and emits a ripple (group-has-checked:animate-tcb18-ripple) that escapes the box instead of being clipped inside it.

Live Demo
Plain CSSTailwind v4
Try it

Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time

Untitled UI React · Affiliate link

Get Untitled UI Pro

The code

<section class="tcb-18 w-full min-h-svh grid place-items-center bg-tcb18-bg px-5 py-14 font-tcb18-sans text-tcb18-ink selection:bg-tcb18-acc selection:text-white" aria-label="Ripple wave checkboxes">
  <div class="w-full max-w-[25rem] rounded-2xl border border-tcb18-line bg-white px-3 py-2">
    <label class="group flex min-h-14 cursor-pointer items-center gap-2 pr-2"><input type="checkbox" class="peer sr-only" checked><span aria-hidden="true" class="relative grid size-10 flex-none place-items-center rounded-full transition-colors group-hover:bg-tcb18-acc/8 group-has-focus-visible:bg-tcb18-acc/12 peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb18-acc"><span class="absolute inset-0 scale-0 rounded-full bg-tcb18-acc opacity-0 group-has-checked:animate-tcb18-ripple motion-reduce:hidden"></span><span class="relative grid size-5 place-items-center rounded-[4px] border-2 border-tcb18-box bg-white text-white transition-colors duration-200 group-has-checked:border-tcb18-acc group-has-checked:bg-tcb18-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.5 scale-50 opacity-0 transition duration-200 ease-[cubic-bezier(.2,.9,.3,1.2)] group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span></span><span class="text-[15px]">Sync across devices</span></label>
    <label class="group flex min-h-14 cursor-pointer items-center gap-2 pr-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="relative grid size-10 flex-none place-items-center rounded-full transition-colors group-hover:bg-tcb18-acc/8 group-has-focus-visible:bg-tcb18-acc/12 peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb18-acc"><span class="absolute inset-0 scale-0 rounded-full bg-tcb18-acc opacity-0 group-has-checked:animate-tcb18-ripple motion-reduce:hidden"></span><span class="relative grid size-5 place-items-center rounded-[4px] border-2 border-tcb18-box bg-white text-white transition-colors duration-200 group-has-checked:border-tcb18-acc group-has-checked:bg-tcb18-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.5 scale-50 opacity-0 transition duration-200 ease-[cubic-bezier(.2,.9,.3,1.2)] group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span></span><span class="text-[15px]">Offline downloads</span></label>
    <label class="group flex min-h-14 cursor-pointer items-center gap-2 pr-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="relative grid size-10 flex-none place-items-center rounded-full transition-colors group-hover:bg-tcb18-acc/8 group-has-focus-visible:bg-tcb18-acc/12 peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb18-acc"><span class="absolute inset-0 scale-0 rounded-full bg-tcb18-acc opacity-0 group-has-checked:animate-tcb18-ripple motion-reduce:hidden"></span><span class="relative grid size-5 place-items-center rounded-[4px] border-2 border-tcb18-box bg-white text-white transition-colors duration-200 group-has-checked:border-tcb18-acc group-has-checked:bg-tcb18-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.5 scale-50 opacity-0 transition duration-200 ease-[cubic-bezier(.2,.9,.3,1.2)] group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span></span><span class="text-[15px]">Background refresh</span></label>
  </div>
</section>
@import "tailwindcss";

@theme {
  --color-tcb18-bg: #f4f5fa;
  --color-tcb18-bg: oklch(0.97 0.006 275);
  --color-tcb18-ink: #2c3040;
  --color-tcb18-ink: oklch(0.3 0.025 275);
  --color-tcb18-line: #e5e7f0;
  --color-tcb18-line: oklch(0.925 0.01 275);
  --color-tcb18-box: #6f7690;
  --color-tcb18-box: oklch(0.56 0.04 275);
  --color-tcb18-acc: #4c5fd5;
  --color-tcb18-acc: oklch(0.54 0.18 270);
  --font-tcb18-sans: 'DM Sans', system-ui, sans-serif;
  --animate-tcb18-ripple: tcb18-ripple 0.55s ease-out;

  @keyframes tcb18-ripple {
    from {
      scale: 0.4;
      opacity: 0.3;
    }

    to {
      scale: 1.25;
      opacity: 0;
    }
  }
}
/* 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-18 {
  width: 100%;
  min-height: 100svh;
}

Setup — do this once per project

Skip this if your project already runs Tailwind v4.

1Load Tailwind
<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.

2Add the stylesheetRequiredthe @theme block is what makes the custom utilities exist
@import "tailwindcss";

@theme {
  --color-tcb18-bg: #f4f5fa;
  --color-tcb18-bg: oklch(0.97 0.006 275);
  --color-tcb18-ink: #2c3040;
  --color-tcb18-ink: oklch(0.3 0.025 275);
  --color-tcb18-line: #e5e7f0;
  --color-tcb18-line: oklch(0.925 0.01 275);
  --color-tcb18-box: #6f7690;
  --color-tcb18-box: oklch(0.56 0.04 275);
  --color-tcb18-acc: #4c5fd5;
  --color-tcb18-acc: oklch(0.54 0.18 270);
  --font-tcb18-sans: 'DM Sans', system-ui, sans-serif;
  --animate-tcb18-ripple: tcb18-ripple 0.55s ease-out;

  @keyframes tcb18-ripple {
    from {
      scale: 0.4;
      opacity: 0.3;
    }

    to {
      scale: 1.25;
      opacity: 0;
    }
  }
}
/* 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-18 {
  width: 100%;
  min-height: 100svh;
}
3Fonts used by this demooptional — skip if you have your own type stack
<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=DM+Sans:opsz,wght@9..40,400..700&display=swap">

What changed in the port

Which parts became utilities, which stayed CSS, and why.

  • transform:translate(-50%,-50%) scale(…) inside the keyframes became plain scale — the layer is centred by grid, not transforms.
  • .ripple{display:none} under reduced motion became motion-reduce:hidden.
  • UI upgrade from the CSS original: the ripple moved out of the clipped box into a Material-style 40px state layer, so it's actually visible; hover and keyboard focus now tint that layer (8% / 12%).
  • UI upgrade: the unchecked border darkened from #b9bfd4 (1.8:1) to Material's on-surface-variant weight (4.6:1).
Paste this into ChatGPT, Claude, Cursor, or any coding assistant. The block below is pre-framed with everything the AI needs to integrate this demo into your project — markup, styles, scoping notes, and the source URL. Hit Copy and paste straight into your chat.
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: Material Ripple Checkbox in Tailwind CSS — State Layer & Wave
Source: https://codefronts.com/components/tailwind-css-checkboxes/material-ripple-checkbox-tailwind/

Material-style checkboxes with the halo done right: a 40px circular state layer sits behind the box, tints on hover and focus, and emits a ripple (group-has-checked:animate-tcb18-ripple) that escapes the box instead of being clipped inside it.
## HTML
```html
<section class="tcb-18 w-full min-h-svh grid place-items-center bg-tcb18-bg px-5 py-14 font-tcb18-sans text-tcb18-ink selection:bg-tcb18-acc selection:text-white" aria-label="Ripple wave checkboxes">
  <div class="w-full max-w-[25rem] rounded-2xl border border-tcb18-line bg-white px-3 py-2">
    <label class="group flex min-h-14 cursor-pointer items-center gap-2 pr-2"><input type="checkbox" class="peer sr-only" checked><span aria-hidden="true" class="relative grid size-10 flex-none place-items-center rounded-full transition-colors group-hover:bg-tcb18-acc/8 group-has-focus-visible:bg-tcb18-acc/12 peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb18-acc"><span class="absolute inset-0 scale-0 rounded-full bg-tcb18-acc opacity-0 group-has-checked:animate-tcb18-ripple motion-reduce:hidden"></span><span class="relative grid size-5 place-items-center rounded-[4px] border-2 border-tcb18-box bg-white text-white transition-colors duration-200 group-has-checked:border-tcb18-acc group-has-checked:bg-tcb18-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.5 scale-50 opacity-0 transition duration-200 ease-[cubic-bezier(.2,.9,.3,1.2)] group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span></span><span class="text-[15px]">Sync across devices</span></label>
    <label class="group flex min-h-14 cursor-pointer items-center gap-2 pr-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="relative grid size-10 flex-none place-items-center rounded-full transition-colors group-hover:bg-tcb18-acc/8 group-has-focus-visible:bg-tcb18-acc/12 peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb18-acc"><span class="absolute inset-0 scale-0 rounded-full bg-tcb18-acc opacity-0 group-has-checked:animate-tcb18-ripple motion-reduce:hidden"></span><span class="relative grid size-5 place-items-center rounded-[4px] border-2 border-tcb18-box bg-white text-white transition-colors duration-200 group-has-checked:border-tcb18-acc group-has-checked:bg-tcb18-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.5 scale-50 opacity-0 transition duration-200 ease-[cubic-bezier(.2,.9,.3,1.2)] group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span></span><span class="text-[15px]">Offline downloads</span></label>
    <label class="group flex min-h-14 cursor-pointer items-center gap-2 pr-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="relative grid size-10 flex-none place-items-center rounded-full transition-colors group-hover:bg-tcb18-acc/8 group-has-focus-visible:bg-tcb18-acc/12 peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb18-acc"><span class="absolute inset-0 scale-0 rounded-full bg-tcb18-acc opacity-0 group-has-checked:animate-tcb18-ripple motion-reduce:hidden"></span><span class="relative grid size-5 place-items-center rounded-[4px] border-2 border-tcb18-box bg-white text-white transition-colors duration-200 group-has-checked:border-tcb18-acc group-has-checked:bg-tcb18-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.5 scale-50 opacity-0 transition duration-200 ease-[cubic-bezier(.2,.9,.3,1.2)] group-has-checked:scale-100 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span></span><span class="text-[15px]">Background refresh</span></label>
  </div>
</section>
```
## CSS
```css
@import "tailwindcss";

@theme {
  --color-tcb18-bg: #f4f5fa;
  --color-tcb18-bg: oklch(0.97 0.006 275);
  --color-tcb18-ink: #2c3040;
  --color-tcb18-ink: oklch(0.3 0.025 275);
  --color-tcb18-line: #e5e7f0;
  --color-tcb18-line: oklch(0.925 0.01 275);
  --color-tcb18-box: #6f7690;
  --color-tcb18-box: oklch(0.56 0.04 275);
  --color-tcb18-acc: #4c5fd5;
  --color-tcb18-acc: oklch(0.54 0.18 270);
  --font-tcb18-sans: 'DM Sans', system-ui, sans-serif;
  --animate-tcb18-ripple: tcb18-ripple 0.55s ease-out;

  @keyframes tcb18-ripple {
    from {
      scale: 0.4;
      opacity: 0.3;
    }

    to {
      scale: 1.25;
      opacity: 0;
    }
  }
}
/* 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-18 {
  width: 100%;
  min-height: 100svh;
}
```

How this works

Ripples belong outside. The original placed the ripple inside the box with overflow:hidden, so it was a 26px flash under a solid fill — effectively invisible. Material places a circular state layer around the control; the ripple now expands from there.

v4 scale. The keyframes animate the standalone scale property, so they don't have to repeat the translate(-50%,-50%) centring the original needed.

Make it yours

  • Material 3 sizing: size-[18px] box, size-10 layer.
  • Colour: --color-tcb18-acc drives layer, ripple and fill.
  • Stronger ripple: opacity: 0.35 in the keyframe's start.
  • Error state: aria-invalid: with a red token.

Gotchas — read before shipping

  • The ripple fires on check only; for a ripple on uncheck, add a second animation on the unchecked state.
  • Initially-checked boxes ripple on load.
  • Reduced motion hides the ripple but keeps the hover state layer.

Browser support

ChromeSafariFirefoxEdge
111+16.4+128+111+

The individual scale property needs Chrome 104 / Safari 14.1 / Firefox 72.

Techniques used in this demo

Plain CSSno Tailwind surface

Search CodeFronts

Loading…