14 / 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
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.
Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time
Untitled UI React · Affiliate link
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><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;
}@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.
<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-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;
}@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;
}<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">
<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)becamerotate-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.
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;
}
```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-dashedreads as a loader-like spin. - Square:
rounded-lgon box and ring (rotation then shows the corners). - Timing: the ring's
duration-500and the tick'sdelay-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
| Chrome | Safari | Firefox | Edge |
|---|---|---|---|
| 111+ | 16.4+ | 128+ | 111+ |
The individual rotate property needs Chrome 104 / Safari 14.1 / Firefox 72.