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

Rotating Ring Checkbox in Tailwind CSS — Spin-to-Check

A circular checkbox whose ring spins a full turn as the tick twists into place. The port fixes a quiet bug: the original rotated a uniform ring, which looks identical at every angle — here the ring has a lighter arc (border-t-tcb14-acc/25), so the group-has-checked:rotate-360 is actually visible.

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-14 w-full min-h-svh grid place-items-center bg-tcb14-bg px-5 py-14 font-tcb14-sans text-tcb14-ink selection:bg-tcb14-acc selection:text-white" aria-label="Rotating ring checkboxes">
  <div class="w-full max-w-[25rem] rounded-2xl border border-tcb14-line bg-white px-4 py-2.5">
    <label class="group flex min-h-14 cursor-pointer items-center gap-4 px-2"><input type="checkbox" class="peer sr-only" checked><span aria-hidden="true" class="relative grid size-[30px] flex-none place-items-center rounded-full bg-tcb14-chip text-tcb14-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb14-acc"><span class="absolute inset-0 rounded-full border-[2.5px] border-tcb14-box border-t-tcb14-box/35 transition-[rotate,border-color] duration-500 ease-[cubic-bezier(.3,1.3,.4,1)] group-has-checked:rotate-360 group-has-checked:border-tcb14-acc group-has-checked:border-t-tcb14-acc/25 motion-reduce:rotate-0 motion-reduce:transition-colors"></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="size-4 -rotate-40 scale-0 opacity-0 transition-[opacity,scale,rotate] delay-120 duration-350 ease-[cubic-bezier(.2,1.3,.4,1)] group-has-checked:rotate-0 group-has-checked:scale-100 group-has-checked:opacity-100 motion-reduce:rotate-0 motion-reduce:scale-100"><path d="M20 6 9 17l-5-5"/></svg></span><span class="text-[15px]">Lock workspace</span></label>
    <label class="group flex min-h-14 cursor-pointer items-center gap-4 px-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="relative grid size-[30px] flex-none place-items-center rounded-full bg-tcb14-chip text-tcb14-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb14-acc"><span class="absolute inset-0 rounded-full border-[2.5px] border-tcb14-box border-t-tcb14-box/35 transition-[rotate,border-color] duration-500 ease-[cubic-bezier(.3,1.3,.4,1)] group-has-checked:rotate-360 group-has-checked:border-tcb14-acc group-has-checked:border-t-tcb14-acc/25 motion-reduce:rotate-0 motion-reduce:transition-colors"></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="size-4 -rotate-40 scale-0 opacity-0 transition-[opacity,scale,rotate] delay-120 duration-350 ease-[cubic-bezier(.2,1.3,.4,1)] group-has-checked:rotate-0 group-has-checked:scale-100 group-has-checked:opacity-100 motion-reduce:rotate-0 motion-reduce:scale-100"><path d="M20 6 9 17l-5-5"/></svg></span><span class="text-[15px]">Require passphrase</span></label>
    <label class="group flex min-h-14 cursor-pointer items-center gap-4 px-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="relative grid size-[30px] flex-none place-items-center rounded-full bg-tcb14-chip text-tcb14-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb14-acc"><span class="absolute inset-0 rounded-full border-[2.5px] border-tcb14-box border-t-tcb14-box/35 transition-[rotate,border-color] duration-500 ease-[cubic-bezier(.3,1.3,.4,1)] group-has-checked:rotate-360 group-has-checked:border-tcb14-acc group-has-checked:border-t-tcb14-acc/25 motion-reduce:rotate-0 motion-reduce:transition-colors"></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="size-4 -rotate-40 scale-0 opacity-0 transition-[opacity,scale,rotate] delay-120 duration-350 ease-[cubic-bezier(.2,1.3,.4,1)] group-has-checked:rotate-0 group-has-checked:scale-100 group-has-checked:opacity-100 motion-reduce:rotate-0 motion-reduce:scale-100"><path d="M20 6 9 17l-5-5"/></svg></span><span class="text-[15px]">Auto-lock on idle</span></label>
  </div>
</section>
@import "tailwindcss";

@theme {
  --color-tcb14-bg: #f5f2f8;
  --color-tcb14-bg: oklch(0.965 0.008 305);
  --color-tcb14-ink: #332a3d;
  --color-tcb14-ink: oklch(0.3 0.03 305);
  --color-tcb14-line: #e8e2ee;
  --color-tcb14-line: oklch(0.925 0.012 305);
  --color-tcb14-chip: #f3eff8;
  --color-tcb14-chip: oklch(0.96 0.01 305);
  --color-tcb14-box: #a597b6;
  --color-tcb14-box: oklch(0.7 0.045 305);
  --color-tcb14-acc: #8a3fc4;
  --color-tcb14-acc: oklch(0.52 0.19 305);
  --font-tcb14-sans: 'Sora', system-ui, sans-serif;
}
/* 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-14 {
  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-tcb14-bg: #f5f2f8;
  --color-tcb14-bg: oklch(0.965 0.008 305);
  --color-tcb14-ink: #332a3d;
  --color-tcb14-ink: oklch(0.3 0.03 305);
  --color-tcb14-line: #e8e2ee;
  --color-tcb14-line: oklch(0.925 0.012 305);
  --color-tcb14-chip: #f3eff8;
  --color-tcb14-chip: oklch(0.96 0.01 305);
  --color-tcb14-box: #a597b6;
  --color-tcb14-box: oklch(0.7 0.045 305);
  --color-tcb14-acc: #8a3fc4;
  --color-tcb14-acc: oklch(0.52 0.19 305);
  --font-tcb14-sans: 'Sora', system-ui, sans-serif;
}
/* 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-14 {
  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=Sora:wght@400;500;600;700&display=swap">

What changed in the port

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

  • .ring{transform:rotate(0) scale(1)} → rotate(360deg) became rotate-0 → group-has-checked:rotate-360.
  • The tick's scale(0) rotate(-40deg) entry became three separate utilities (scale-0 -rotate-40 opacity-0) transitioned together.
  • UI upgrade from the CSS original: bug fix — the ring now has a lighter arc so the 360° spin is visible; before, a uniform ring rotated invisibly.
  • UI upgrade: the empty ring rose from #cfc6dd (1.6: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: Rotating Ring Checkbox in Tailwind CSS — Spin-to-Check
Source: https://codefronts.com/components/tailwind-css-checkboxes/rotating-ring-checkbox-tailwind/

A circular checkbox whose ring spins a full turn as the tick twists into place. The port fixes a quiet bug: the original rotated a uniform ring, which looks identical at every angle — here the ring has a lighter arc (border-t-tcb14-acc/25), so the group-has-checked:rotate-360 is actually visible.
## HTML
```html
<section class="tcb-14 w-full min-h-svh grid place-items-center bg-tcb14-bg px-5 py-14 font-tcb14-sans text-tcb14-ink selection:bg-tcb14-acc selection:text-white" aria-label="Rotating ring checkboxes">
  <div class="w-full max-w-[25rem] rounded-2xl border border-tcb14-line bg-white px-4 py-2.5">
    <label class="group flex min-h-14 cursor-pointer items-center gap-4 px-2"><input type="checkbox" class="peer sr-only" checked><span aria-hidden="true" class="relative grid size-[30px] flex-none place-items-center rounded-full bg-tcb14-chip text-tcb14-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb14-acc"><span class="absolute inset-0 rounded-full border-[2.5px] border-tcb14-box border-t-tcb14-box/35 transition-[rotate,border-color] duration-500 ease-[cubic-bezier(.3,1.3,.4,1)] group-has-checked:rotate-360 group-has-checked:border-tcb14-acc group-has-checked:border-t-tcb14-acc/25 motion-reduce:rotate-0 motion-reduce:transition-colors"></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="size-4 -rotate-40 scale-0 opacity-0 transition-[opacity,scale,rotate] delay-120 duration-350 ease-[cubic-bezier(.2,1.3,.4,1)] group-has-checked:rotate-0 group-has-checked:scale-100 group-has-checked:opacity-100 motion-reduce:rotate-0 motion-reduce:scale-100"><path d="M20 6 9 17l-5-5"/></svg></span><span class="text-[15px]">Lock workspace</span></label>
    <label class="group flex min-h-14 cursor-pointer items-center gap-4 px-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="relative grid size-[30px] flex-none place-items-center rounded-full bg-tcb14-chip text-tcb14-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb14-acc"><span class="absolute inset-0 rounded-full border-[2.5px] border-tcb14-box border-t-tcb14-box/35 transition-[rotate,border-color] duration-500 ease-[cubic-bezier(.3,1.3,.4,1)] group-has-checked:rotate-360 group-has-checked:border-tcb14-acc group-has-checked:border-t-tcb14-acc/25 motion-reduce:rotate-0 motion-reduce:transition-colors"></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="size-4 -rotate-40 scale-0 opacity-0 transition-[opacity,scale,rotate] delay-120 duration-350 ease-[cubic-bezier(.2,1.3,.4,1)] group-has-checked:rotate-0 group-has-checked:scale-100 group-has-checked:opacity-100 motion-reduce:rotate-0 motion-reduce:scale-100"><path d="M20 6 9 17l-5-5"/></svg></span><span class="text-[15px]">Require passphrase</span></label>
    <label class="group flex min-h-14 cursor-pointer items-center gap-4 px-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="relative grid size-[30px] flex-none place-items-center rounded-full bg-tcb14-chip text-tcb14-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb14-acc"><span class="absolute inset-0 rounded-full border-[2.5px] border-tcb14-box border-t-tcb14-box/35 transition-[rotate,border-color] duration-500 ease-[cubic-bezier(.3,1.3,.4,1)] group-has-checked:rotate-360 group-has-checked:border-tcb14-acc group-has-checked:border-t-tcb14-acc/25 motion-reduce:rotate-0 motion-reduce:transition-colors"></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="size-4 -rotate-40 scale-0 opacity-0 transition-[opacity,scale,rotate] delay-120 duration-350 ease-[cubic-bezier(.2,1.3,.4,1)] group-has-checked:rotate-0 group-has-checked:scale-100 group-has-checked:opacity-100 motion-reduce:rotate-0 motion-reduce:scale-100"><path d="M20 6 9 17l-5-5"/></svg></span><span class="text-[15px]">Auto-lock on idle</span></label>
  </div>
</section>
```
## CSS
```css
@import "tailwindcss";

@theme {
  --color-tcb14-bg: #f5f2f8;
  --color-tcb14-bg: oklch(0.965 0.008 305);
  --color-tcb14-ink: #332a3d;
  --color-tcb14-ink: oklch(0.3 0.03 305);
  --color-tcb14-line: #e8e2ee;
  --color-tcb14-line: oklch(0.925 0.012 305);
  --color-tcb14-chip: #f3eff8;
  --color-tcb14-chip: oklch(0.96 0.01 305);
  --color-tcb14-box: #a597b6;
  --color-tcb14-box: oklch(0.7 0.045 305);
  --color-tcb14-acc: #8a3fc4;
  --color-tcb14-acc: oklch(0.52 0.19 305);
  --font-tcb14-sans: 'Sora', system-ui, sans-serif;
}
/* 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-14 {
  width: 100%;
  min-height: 100svh;
}
```

How this works

Rotation needs asymmetry. A solid-colour circle rotated 360° looks static. Giving the top border a translucent accent makes one arc lighter, and the eye follows it round.

Two motions, one moment. The ring spins over 500ms; the tick starts 120ms later with its own spring — staggered, not simultaneous.

v4 rotate is the standalone rotate property, so the ring's rotation and any hover scale compose without a transform string.

Make it yours

  • Counter-spin: group-has-checked:-rotate-360.
  • Dashed ring: border-dashed reads as a loader-like spin.
  • Square: rounded-lg on box and ring (rotation then shows the corners).
  • Timing: the ring's duration-500 and the tick's delay-120.

Gotchas — read before shipping

  • Reduced motion removes both rotations and fades the tick.
  • Keep the lighter arc subtle — too strong and the unchecked ring looks broken.
  • Rotating by 360 transitions back through −360 on uncheck; that's intended.

Browser support

ChromeSafariFirefoxEdge
111+16.4+128+111+

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

Techniques used in this demo

Utilitiesfirst-class utility or variant

Search CodeFronts

Loading…