29 Tailwind CSS Checkboxes
13 / 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

Liquid Fill Checkbox Animation in Tailwind CSS — Water Wave

Water rises into the box on check: an oversized, wavy-topped blob slides up from translate-y-[105%] to group-has-checked:translate-y-0, then keeps sloshing with animate-tcb13-wave. Hovering an empty box now lets the water peek in, previewing the action.

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-13 w-full min-h-svh grid place-items-center bg-tcb13-bg px-5 py-14 font-tcb13-sans text-tcb13-ink selection:bg-tcb13-water selection:text-white" aria-label="Liquid fill checkboxes">
  <div class="w-full max-w-[25rem] rounded-2xl border border-tcb13-line bg-white px-4 py-2.5">
    <label class="group flex min-h-15 cursor-pointer items-center gap-3.5 px-2"><input type="checkbox" class="peer sr-only" checked><span aria-hidden="true" class="relative grid size-7 flex-none place-items-center overflow-hidden rounded-lg border-2 border-tcb13-box bg-white text-white transition-colors duration-300 peer-checked:border-tcb13-water peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb13-water"><span class="absolute -left-1/4 bottom-0 h-[130%] w-[150%] translate-y-[105%] rounded-[42%_46%_0_0/14px] bg-tcb13-water transition-transform duration-500 ease-[cubic-bezier(.5,.1,.3,1)] group-hover:translate-y-[78%] group-has-checked:translate-y-0 group-has-checked:animate-tcb13-wave motion-reduce:animate-none motion-reduce:transition-none"></span><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="relative z-10 size-[15px] opacity-0 transition-opacity delay-180 duration-250 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span><span><span class="block text-[15px] font-medium">Drink water</span><span class="block text-[13px] text-tcb13-mut">2 litres</span></span></label>
    <label class="group flex min-h-15 cursor-pointer items-center gap-3.5 px-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="relative grid size-7 flex-none place-items-center overflow-hidden rounded-lg border-2 border-tcb13-box bg-white text-white transition-colors duration-300 peer-checked:border-tcb13-water peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb13-water"><span class="absolute -left-1/4 bottom-0 h-[130%] w-[150%] translate-y-[105%] rounded-[42%_46%_0_0/14px] bg-tcb13-water transition-transform duration-500 ease-[cubic-bezier(.5,.1,.3,1)] group-hover:translate-y-[78%] group-has-checked:translate-y-0 group-has-checked:animate-tcb13-wave motion-reduce:animate-none motion-reduce:transition-none"></span><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="relative z-10 size-[15px] opacity-0 transition-opacity delay-180 duration-250 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span><span><span class="block text-[15px] font-medium">Morning workout</span><span class="block text-[13px] text-tcb13-mut">30 minutes</span></span></label>
    <label class="group flex min-h-15 cursor-pointer items-center gap-3.5 px-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="relative grid size-7 flex-none place-items-center overflow-hidden rounded-lg border-2 border-tcb13-box bg-white text-white transition-colors duration-300 peer-checked:border-tcb13-water peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb13-water"><span class="absolute -left-1/4 bottom-0 h-[130%] w-[150%] translate-y-[105%] rounded-[42%_46%_0_0/14px] bg-tcb13-water transition-transform duration-500 ease-[cubic-bezier(.5,.1,.3,1)] group-hover:translate-y-[78%] group-has-checked:translate-y-0 group-has-checked:animate-tcb13-wave motion-reduce:animate-none motion-reduce:transition-none"></span><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="relative z-10 size-[15px] opacity-0 transition-opacity delay-180 duration-250 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span><span><span class="block text-[15px] font-medium">Read 20 pages</span><span class="block text-[13px] text-tcb13-mut">Before bed</span></span></label>
  </div>
</section>
@import "tailwindcss";

@theme {
  --color-tcb13-bg: #eef4f8;
  --color-tcb13-bg: oklch(0.96 0.008 235);
  --color-tcb13-ink: #2c3a44;
  --color-tcb13-ink: oklch(0.33 0.025 240);
  --color-tcb13-mut: #566873;
  --color-tcb13-mut: oklch(0.49 0.025 235);
  --color-tcb13-line: #dce6ee;
  --color-tcb13-line: oklch(0.92 0.012 240);
  --color-tcb13-box: #8ea6b6;
  --color-tcb13-box: oklch(0.7 0.035 235);
  --color-tcb13-water: #2b86c4;
  --color-tcb13-water: oklch(0.58 0.13 240);
  --font-tcb13-sans: 'Outfit', system-ui, sans-serif;
  --animate-tcb13-wave: tcb13-wave 3s linear infinite;

  @keyframes tcb13-wave {
    0%,
        100% {
      border-radius: 42% 46% 0 0 / 14px;
    }

    50% {
      border-radius: 46% 40% 0 0 / 12px;
    }
  }
}
/* 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-13 {
  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-tcb13-bg: #eef4f8;
  --color-tcb13-bg: oklch(0.96 0.008 235);
  --color-tcb13-ink: #2c3a44;
  --color-tcb13-ink: oklch(0.33 0.025 240);
  --color-tcb13-mut: #566873;
  --color-tcb13-mut: oklch(0.49 0.025 235);
  --color-tcb13-line: #dce6ee;
  --color-tcb13-line: oklch(0.92 0.012 240);
  --color-tcb13-box: #8ea6b6;
  --color-tcb13-box: oklch(0.7 0.035 235);
  --color-tcb13-water: #2b86c4;
  --color-tcb13-water: oklch(0.58 0.13 240);
  --font-tcb13-sans: 'Outfit', system-ui, sans-serif;
  --animate-tcb13-wave: tcb13-wave 3s linear infinite;

  @keyframes tcb13-wave {
    0%,
        100% {
      border-radius: 42% 46% 0 0 / 14px;
    }

    50% {
      border-radius: 46% 40% 0 0 / 12px;
    }
  }
}
/* 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-13 {
  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=Outfit:wght@400;500;600;700&display=swap">

What changed in the port

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

  • .liquid{border-radius:42% 46% 0 0/14px;transform:translateY(105%)} became rounded-[42%_46%_0_0/14px] translate-y-[105%] — underscores are spaces.
  • The ::after tick with transition:opacity .25s .18s became an SVG with delay-180 duration-250.
  • UI upgrade from the CSS original: hovering an empty box lets the water peek in (group-hover:translate-y-[78%]), previewing the action; rows gained a goal caption.
  • UI upgrade: the empty border rose from #b9cad6 (1.7:1) to 3: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: Liquid Fill Checkbox Animation in Tailwind CSS — Water Wave
Source: https://codefronts.com/components/tailwind-css-checkboxes/liquid-fill-checkbox-tailwind-water-wave/

Water rises into the box on check: an oversized, wavy-topped blob slides up from translate-y-[105%] to group-has-checked:translate-y-0, then keeps sloshing with animate-tcb13-wave. Hovering an empty box now lets the water peek in, previewing the action.
## HTML
```html
<section class="tcb-13 w-full min-h-svh grid place-items-center bg-tcb13-bg px-5 py-14 font-tcb13-sans text-tcb13-ink selection:bg-tcb13-water selection:text-white" aria-label="Liquid fill checkboxes">
  <div class="w-full max-w-[25rem] rounded-2xl border border-tcb13-line bg-white px-4 py-2.5">
    <label class="group flex min-h-15 cursor-pointer items-center gap-3.5 px-2"><input type="checkbox" class="peer sr-only" checked><span aria-hidden="true" class="relative grid size-7 flex-none place-items-center overflow-hidden rounded-lg border-2 border-tcb13-box bg-white text-white transition-colors duration-300 peer-checked:border-tcb13-water peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb13-water"><span class="absolute -left-1/4 bottom-0 h-[130%] w-[150%] translate-y-[105%] rounded-[42%_46%_0_0/14px] bg-tcb13-water transition-transform duration-500 ease-[cubic-bezier(.5,.1,.3,1)] group-hover:translate-y-[78%] group-has-checked:translate-y-0 group-has-checked:animate-tcb13-wave motion-reduce:animate-none motion-reduce:transition-none"></span><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="relative z-10 size-[15px] opacity-0 transition-opacity delay-180 duration-250 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span><span><span class="block text-[15px] font-medium">Drink water</span><span class="block text-[13px] text-tcb13-mut">2 litres</span></span></label>
    <label class="group flex min-h-15 cursor-pointer items-center gap-3.5 px-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="relative grid size-7 flex-none place-items-center overflow-hidden rounded-lg border-2 border-tcb13-box bg-white text-white transition-colors duration-300 peer-checked:border-tcb13-water peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb13-water"><span class="absolute -left-1/4 bottom-0 h-[130%] w-[150%] translate-y-[105%] rounded-[42%_46%_0_0/14px] bg-tcb13-water transition-transform duration-500 ease-[cubic-bezier(.5,.1,.3,1)] group-hover:translate-y-[78%] group-has-checked:translate-y-0 group-has-checked:animate-tcb13-wave motion-reduce:animate-none motion-reduce:transition-none"></span><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="relative z-10 size-[15px] opacity-0 transition-opacity delay-180 duration-250 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span><span><span class="block text-[15px] font-medium">Morning workout</span><span class="block text-[13px] text-tcb13-mut">30 minutes</span></span></label>
    <label class="group flex min-h-15 cursor-pointer items-center gap-3.5 px-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="relative grid size-7 flex-none place-items-center overflow-hidden rounded-lg border-2 border-tcb13-box bg-white text-white transition-colors duration-300 peer-checked:border-tcb13-water peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb13-water"><span class="absolute -left-1/4 bottom-0 h-[130%] w-[150%] translate-y-[105%] rounded-[42%_46%_0_0/14px] bg-tcb13-water transition-transform duration-500 ease-[cubic-bezier(.5,.1,.3,1)] group-hover:translate-y-[78%] group-has-checked:translate-y-0 group-has-checked:animate-tcb13-wave motion-reduce:animate-none motion-reduce:transition-none"></span><svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" class="relative z-10 size-[15px] opacity-0 transition-opacity delay-180 duration-250 group-has-checked:opacity-100"><path d="M20 6 9 17l-5-5"/></svg></span><span><span class="block text-[15px] font-medium">Read 20 pages</span><span class="block text-[13px] text-tcb13-mut">Before bed</span></span></label>
  </div>
</section>
```
## CSS
```css
@import "tailwindcss";

@theme {
  --color-tcb13-bg: #eef4f8;
  --color-tcb13-bg: oklch(0.96 0.008 235);
  --color-tcb13-ink: #2c3a44;
  --color-tcb13-ink: oklch(0.33 0.025 240);
  --color-tcb13-mut: #566873;
  --color-tcb13-mut: oklch(0.49 0.025 235);
  --color-tcb13-line: #dce6ee;
  --color-tcb13-line: oklch(0.92 0.012 240);
  --color-tcb13-box: #8ea6b6;
  --color-tcb13-box: oklch(0.7 0.035 235);
  --color-tcb13-water: #2b86c4;
  --color-tcb13-water: oklch(0.58 0.13 240);
  --font-tcb13-sans: 'Outfit', system-ui, sans-serif;
  --animate-tcb13-wave: tcb13-wave 3s linear infinite;

  @keyframes tcb13-wave {
    0%,
        100% {
      border-radius: 42% 46% 0 0 / 14px;
    }

    50% {
      border-radius: 46% 40% 0 0 / 12px;
    }
  }
}
/* 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-13 {
  width: 100%;
  min-height: 100svh;
}
```

How this works

A blob wider than its box. The liquid is 150% wide and 130% tall with asymmetric elliptical top corners; overflow-hidden on the box crops it to a wavy waterline.

State order. Hover (translate-y-[78%]) and checked (translate-y-0) both set translate; Tailwind orders group-has-checked: after group-hover:, so checked wins.

Slosh. The keyframes animate border-radius only — a cheap paint on a 28px element.

Make it yours

  • Colour: --color-tcb13-water.
  • Faster fill: duration-300.
  • Disable slosh: remove group-has-checked:animate-tcb13-wave.
  • Progress bar: reuse the liquid on a wide track with translate-y set from a style variable.

Gotchas — read before shipping

  • Border-radius animation repaints; don't use it on hundreds of rows.
  • The tick needs relative z-10 to sit above the water.
  • Reduced motion stops the slosh and the rise but keeps the filled state.

Browser support

ChromeSafariFirefoxEdge
111+16.4+128+111+

Elliptical border-radius and keyframes are universal.

Techniques used in this demo

Utilitiesfirst-class utility or variant

Plain CSSno Tailwind surface

Search CodeFronts

Loading…