09 / 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
Animated SVG Checkmark in Tailwind CSS — stroke-dashoffset Draw
The checkmark draws itself: an inline SVG path starts fully dashed-out with [stroke-dashoffset:24] and animates to group-has-checked:[stroke-dashoffset:0]. Rows become a pipeline with a connecting rail and step captions.
Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-time
Untitled UI React · Affiliate link
The code
<section class="tcb-09 w-full min-h-svh grid place-items-center bg-tcb09-bg px-5 py-14 font-tcb09-sans text-tcb09-ink selection:bg-tcb09-acc selection:text-white" aria-label="Draw-stroke checkmark checkboxes">
<div class="w-full max-w-[25rem] rounded-2xl border border-tcb09-line bg-white px-4 py-3">
<label class="group relative flex min-h-16 cursor-pointer items-center gap-3.5 px-2 before:absolute before:left-[21px] before:top-[calc(50%+17px)] before:h-[calc(100%-34px)] before:w-0.5 before:rounded-full before:bg-tcb09-line before:content-['']"><input type="checkbox" class="peer sr-only" checked><span aria-hidden="true" class="grid size-[26px] flex-none place-items-center rounded-[7px] border-2 border-tcb09-box bg-white text-white transition-colors duration-250 peer-checked:border-tcb09-acc peer-checked:bg-tcb09-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb09-acc motion-reduce:transition-none"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="size-[18px]"><path d="M4.5 12.5 10 18 20 6" class="transition-[stroke-dashoffset] duration-450 ease-[cubic-bezier(.6,.1,.3,1)] [stroke-dasharray:24] [stroke-dashoffset:24] group-has-checked:[stroke-dashoffset:0] motion-reduce:transition-none"/></svg></span><span><span class="block text-[15px] font-medium">Contract signed</span><span class="block text-[13px] text-tcb09-mut">Legal · step 1</span></span></label>
<label class="group relative flex min-h-16 cursor-pointer items-center gap-3.5 px-2 before:absolute before:left-[21px] before:top-[calc(50%+17px)] before:h-[calc(100%-34px)] before:w-0.5 before:rounded-full before:bg-tcb09-line before:content-['']"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="grid size-[26px] flex-none place-items-center rounded-[7px] border-2 border-tcb09-box bg-white text-white transition-colors duration-250 peer-checked:border-tcb09-acc peer-checked:bg-tcb09-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb09-acc motion-reduce:transition-none"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="size-[18px]"><path d="M4.5 12.5 10 18 20 6" class="transition-[stroke-dashoffset] duration-450 ease-[cubic-bezier(.6,.1,.3,1)] [stroke-dasharray:24] [stroke-dashoffset:24] group-has-checked:[stroke-dashoffset:0] motion-reduce:transition-none"/></svg></span><span><span class="block text-[15px] font-medium">Payment received</span><span class="block text-[13px] text-tcb09-mut">Finance · step 2</span></span></label>
<label class="group relative flex min-h-16 cursor-pointer items-center gap-3.5 px-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="grid size-[26px] flex-none place-items-center rounded-[7px] border-2 border-tcb09-box bg-white text-white transition-colors duration-250 peer-checked:border-tcb09-acc peer-checked:bg-tcb09-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb09-acc motion-reduce:transition-none"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="size-[18px]"><path d="M4.5 12.5 10 18 20 6" class="transition-[stroke-dashoffset] duration-450 ease-[cubic-bezier(.6,.1,.3,1)] [stroke-dasharray:24] [stroke-dashoffset:24] group-has-checked:[stroke-dashoffset:0] motion-reduce:transition-none"/></svg></span><span><span class="block text-[15px] font-medium">Shipment dispatched</span><span class="block text-[13px] text-tcb09-mut">Ops · step 3</span></span></label>
</div>
</section><section class="tcb-09 w-full min-h-svh grid place-items-center bg-tcb09-bg px-5 py-14 font-tcb09-sans text-tcb09-ink selection:bg-tcb09-acc selection:text-white" aria-label="Draw-stroke checkmark checkboxes">
<div class="w-full max-w-[25rem] rounded-2xl border border-tcb09-line bg-white px-4 py-3">
<label class="group relative flex min-h-16 cursor-pointer items-center gap-3.5 px-2 before:absolute before:left-[21px] before:top-[calc(50%+17px)] before:h-[calc(100%-34px)] before:w-0.5 before:rounded-full before:bg-tcb09-line before:content-['']"><input type="checkbox" class="peer sr-only" checked><span aria-hidden="true" class="grid size-[26px] flex-none place-items-center rounded-[7px] border-2 border-tcb09-box bg-white text-white transition-colors duration-250 peer-checked:border-tcb09-acc peer-checked:bg-tcb09-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb09-acc motion-reduce:transition-none"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="size-[18px]"><path d="M4.5 12.5 10 18 20 6" class="transition-[stroke-dashoffset] duration-450 ease-[cubic-bezier(.6,.1,.3,1)] [stroke-dasharray:24] [stroke-dashoffset:24] group-has-checked:[stroke-dashoffset:0] motion-reduce:transition-none"/></svg></span><span><span class="block text-[15px] font-medium">Contract signed</span><span class="block text-[13px] text-tcb09-mut">Legal · step 1</span></span></label>
<label class="group relative flex min-h-16 cursor-pointer items-center gap-3.5 px-2 before:absolute before:left-[21px] before:top-[calc(50%+17px)] before:h-[calc(100%-34px)] before:w-0.5 before:rounded-full before:bg-tcb09-line before:content-['']"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="grid size-[26px] flex-none place-items-center rounded-[7px] border-2 border-tcb09-box bg-white text-white transition-colors duration-250 peer-checked:border-tcb09-acc peer-checked:bg-tcb09-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb09-acc motion-reduce:transition-none"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="size-[18px]"><path d="M4.5 12.5 10 18 20 6" class="transition-[stroke-dashoffset] duration-450 ease-[cubic-bezier(.6,.1,.3,1)] [stroke-dasharray:24] [stroke-dashoffset:24] group-has-checked:[stroke-dashoffset:0] motion-reduce:transition-none"/></svg></span><span><span class="block text-[15px] font-medium">Payment received</span><span class="block text-[13px] text-tcb09-mut">Finance · step 2</span></span></label>
<label class="group relative flex min-h-16 cursor-pointer items-center gap-3.5 px-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="grid size-[26px] flex-none place-items-center rounded-[7px] border-2 border-tcb09-box bg-white text-white transition-colors duration-250 peer-checked:border-tcb09-acc peer-checked:bg-tcb09-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb09-acc motion-reduce:transition-none"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="size-[18px]"><path d="M4.5 12.5 10 18 20 6" class="transition-[stroke-dashoffset] duration-450 ease-[cubic-bezier(.6,.1,.3,1)] [stroke-dasharray:24] [stroke-dashoffset:24] group-has-checked:[stroke-dashoffset:0] motion-reduce:transition-none"/></svg></span><span><span class="block text-[15px] font-medium">Shipment dispatched</span><span class="block text-[13px] text-tcb09-mut">Ops · step 3</span></span></label>
</div>
</section>@import "tailwindcss";
@theme {
--color-tcb09-bg: #f3f6f4;
--color-tcb09-bg: oklch(0.97 0.005 155);
--color-tcb09-ink: #2c352f;
--color-tcb09-ink: oklch(0.31 0.015 155);
--color-tcb09-mut: #5b675f;
--color-tcb09-mut: oklch(0.49 0.015 155);
--color-tcb09-line: #e2e8e4;
--color-tcb09-line: oklch(0.92 0.008 155);
--color-tcb09-box: #9aa89f;
--color-tcb09-box: oklch(0.7 0.018 155);
--color-tcb09-acc: #1f8a4c;
--color-tcb09-acc: oklch(0.55 0.14 152);
--font-tcb09-sans: 'Outfit', 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-09 {
width: 100%;
min-height: 100svh;
}@import "tailwindcss";
@theme {
--color-tcb09-bg: #f3f6f4;
--color-tcb09-bg: oklch(0.97 0.005 155);
--color-tcb09-ink: #2c352f;
--color-tcb09-ink: oklch(0.31 0.015 155);
--color-tcb09-mut: #5b675f;
--color-tcb09-mut: oklch(0.49 0.015 155);
--color-tcb09-line: #e2e8e4;
--color-tcb09-line: oklch(0.92 0.008 155);
--color-tcb09-box: #9aa89f;
--color-tcb09-box: oklch(0.7 0.018 155);
--color-tcb09-acc: #1f8a4c;
--color-tcb09-acc: oklch(0.55 0.14 152);
--font-tcb09-sans: 'Outfit', 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-09 {
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-tcb09-bg: #f3f6f4;
--color-tcb09-bg: oklch(0.97 0.005 155);
--color-tcb09-ink: #2c352f;
--color-tcb09-ink: oklch(0.31 0.015 155);
--color-tcb09-mut: #5b675f;
--color-tcb09-mut: oklch(0.49 0.015 155);
--color-tcb09-line: #e2e8e4;
--color-tcb09-line: oklch(0.92 0.008 155);
--color-tcb09-box: #9aa89f;
--color-tcb09-box: oklch(0.7 0.018 155);
--color-tcb09-acc: #1f8a4c;
--color-tcb09-acc: oklch(0.55 0.14 152);
--font-tcb09-sans: 'Outfit', 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-09 {
width: 100%;
min-height: 100svh;
}@import "tailwindcss";
@theme {
--color-tcb09-bg: #f3f6f4;
--color-tcb09-bg: oklch(0.97 0.005 155);
--color-tcb09-ink: #2c352f;
--color-tcb09-ink: oklch(0.31 0.015 155);
--color-tcb09-mut: #5b675f;
--color-tcb09-mut: oklch(0.49 0.015 155);
--color-tcb09-line: #e2e8e4;
--color-tcb09-line: oklch(0.92 0.008 155);
--color-tcb09-box: #9aa89f;
--color-tcb09-box: oklch(0.7 0.018 155);
--color-tcb09-acc: #1f8a4c;
--color-tcb09-acc: oklch(0.55 0.14 152);
--font-tcb09-sans: 'Outfit', 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-09 {
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=Outfit: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=Outfit:wght@400;500;600;700&display=swap">What changed in the port
Which parts became utilities, which stayed CSS, and why.
.box svg path{stroke-dasharray:24;stroke-dashoffset:24}became arbitrary properties on the path; the:checkeddescendant rule becamegroup-has-checked:[stroke-dashoffset:0]..box svg{stroke:#fff}becamestroke="currentColor"+text-whiteon the box.- UI upgrade from the CSS original: the list reads as a pipeline — a connecting rail links the step boxes and each row has a step caption.
- UI upgrade: the empty-box border rose from
#c2ccc6(1.6:1) to 3:1 so unchecked boxes are visible (WCAG 1.4.11).
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: Animated SVG Checkmark in Tailwind CSS — stroke-dashoffset Draw
Source: https://codefronts.com/components/tailwind-css-checkboxes/animated-svg-checkmark-tailwind-stroke-draw/
The checkmark draws itself: an inline SVG path starts fully dashed-out with [stroke-dashoffset:24] and animates to group-has-checked:[stroke-dashoffset:0]. Rows become a pipeline with a connecting rail and step captions.
## HTML
```html
<section class="tcb-09 w-full min-h-svh grid place-items-center bg-tcb09-bg px-5 py-14 font-tcb09-sans text-tcb09-ink selection:bg-tcb09-acc selection:text-white" aria-label="Draw-stroke checkmark checkboxes">
<div class="w-full max-w-[25rem] rounded-2xl border border-tcb09-line bg-white px-4 py-3">
<label class="group relative flex min-h-16 cursor-pointer items-center gap-3.5 px-2 before:absolute before:left-[21px] before:top-[calc(50%+17px)] before:h-[calc(100%-34px)] before:w-0.5 before:rounded-full before:bg-tcb09-line before:content-['']"><input type="checkbox" class="peer sr-only" checked><span aria-hidden="true" class="grid size-[26px] flex-none place-items-center rounded-[7px] border-2 border-tcb09-box bg-white text-white transition-colors duration-250 peer-checked:border-tcb09-acc peer-checked:bg-tcb09-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb09-acc motion-reduce:transition-none"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="size-[18px]"><path d="M4.5 12.5 10 18 20 6" class="transition-[stroke-dashoffset] duration-450 ease-[cubic-bezier(.6,.1,.3,1)] [stroke-dasharray:24] [stroke-dashoffset:24] group-has-checked:[stroke-dashoffset:0] motion-reduce:transition-none"/></svg></span><span><span class="block text-[15px] font-medium">Contract signed</span><span class="block text-[13px] text-tcb09-mut">Legal · step 1</span></span></label>
<label class="group relative flex min-h-16 cursor-pointer items-center gap-3.5 px-2 before:absolute before:left-[21px] before:top-[calc(50%+17px)] before:h-[calc(100%-34px)] before:w-0.5 before:rounded-full before:bg-tcb09-line before:content-['']"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="grid size-[26px] flex-none place-items-center rounded-[7px] border-2 border-tcb09-box bg-white text-white transition-colors duration-250 peer-checked:border-tcb09-acc peer-checked:bg-tcb09-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb09-acc motion-reduce:transition-none"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="size-[18px]"><path d="M4.5 12.5 10 18 20 6" class="transition-[stroke-dashoffset] duration-450 ease-[cubic-bezier(.6,.1,.3,1)] [stroke-dasharray:24] [stroke-dashoffset:24] group-has-checked:[stroke-dashoffset:0] motion-reduce:transition-none"/></svg></span><span><span class="block text-[15px] font-medium">Payment received</span><span class="block text-[13px] text-tcb09-mut">Finance · step 2</span></span></label>
<label class="group relative flex min-h-16 cursor-pointer items-center gap-3.5 px-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="grid size-[26px] flex-none place-items-center rounded-[7px] border-2 border-tcb09-box bg-white text-white transition-colors duration-250 peer-checked:border-tcb09-acc peer-checked:bg-tcb09-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb09-acc motion-reduce:transition-none"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="size-[18px]"><path d="M4.5 12.5 10 18 20 6" class="transition-[stroke-dashoffset] duration-450 ease-[cubic-bezier(.6,.1,.3,1)] [stroke-dasharray:24] [stroke-dashoffset:24] group-has-checked:[stroke-dashoffset:0] motion-reduce:transition-none"/></svg></span><span><span class="block text-[15px] font-medium">Shipment dispatched</span><span class="block text-[13px] text-tcb09-mut">Ops · step 3</span></span></label>
</div>
</section>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-tcb09-bg: #f3f6f4;
--color-tcb09-bg: oklch(0.97 0.005 155);
--color-tcb09-ink: #2c352f;
--color-tcb09-ink: oklch(0.31 0.015 155);
--color-tcb09-mut: #5b675f;
--color-tcb09-mut: oklch(0.49 0.015 155);
--color-tcb09-line: #e2e8e4;
--color-tcb09-line: oklch(0.92 0.008 155);
--color-tcb09-box: #9aa89f;
--color-tcb09-box: oklch(0.7 0.018 155);
--color-tcb09-acc: #1f8a4c;
--color-tcb09-acc: oklch(0.55 0.14 152);
--font-tcb09-sans: 'Outfit', 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-09 {
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: Animated SVG Checkmark in Tailwind CSS — stroke-dashoffset Draw
Source: https://codefronts.com/components/tailwind-css-checkboxes/animated-svg-checkmark-tailwind-stroke-draw/
The checkmark draws itself: an inline SVG path starts fully dashed-out with [stroke-dashoffset:24] and animates to group-has-checked:[stroke-dashoffset:0]. Rows become a pipeline with a connecting rail and step captions.
## HTML
```html
<section class="tcb-09 w-full min-h-svh grid place-items-center bg-tcb09-bg px-5 py-14 font-tcb09-sans text-tcb09-ink selection:bg-tcb09-acc selection:text-white" aria-label="Draw-stroke checkmark checkboxes">
<div class="w-full max-w-[25rem] rounded-2xl border border-tcb09-line bg-white px-4 py-3">
<label class="group relative flex min-h-16 cursor-pointer items-center gap-3.5 px-2 before:absolute before:left-[21px] before:top-[calc(50%+17px)] before:h-[calc(100%-34px)] before:w-0.5 before:rounded-full before:bg-tcb09-line before:content-['']"><input type="checkbox" class="peer sr-only" checked><span aria-hidden="true" class="grid size-[26px] flex-none place-items-center rounded-[7px] border-2 border-tcb09-box bg-white text-white transition-colors duration-250 peer-checked:border-tcb09-acc peer-checked:bg-tcb09-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb09-acc motion-reduce:transition-none"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="size-[18px]"><path d="M4.5 12.5 10 18 20 6" class="transition-[stroke-dashoffset] duration-450 ease-[cubic-bezier(.6,.1,.3,1)] [stroke-dasharray:24] [stroke-dashoffset:24] group-has-checked:[stroke-dashoffset:0] motion-reduce:transition-none"/></svg></span><span><span class="block text-[15px] font-medium">Contract signed</span><span class="block text-[13px] text-tcb09-mut">Legal · step 1</span></span></label>
<label class="group relative flex min-h-16 cursor-pointer items-center gap-3.5 px-2 before:absolute before:left-[21px] before:top-[calc(50%+17px)] before:h-[calc(100%-34px)] before:w-0.5 before:rounded-full before:bg-tcb09-line before:content-['']"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="grid size-[26px] flex-none place-items-center rounded-[7px] border-2 border-tcb09-box bg-white text-white transition-colors duration-250 peer-checked:border-tcb09-acc peer-checked:bg-tcb09-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb09-acc motion-reduce:transition-none"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="size-[18px]"><path d="M4.5 12.5 10 18 20 6" class="transition-[stroke-dashoffset] duration-450 ease-[cubic-bezier(.6,.1,.3,1)] [stroke-dasharray:24] [stroke-dashoffset:24] group-has-checked:[stroke-dashoffset:0] motion-reduce:transition-none"/></svg></span><span><span class="block text-[15px] font-medium">Payment received</span><span class="block text-[13px] text-tcb09-mut">Finance · step 2</span></span></label>
<label class="group relative flex min-h-16 cursor-pointer items-center gap-3.5 px-2"><input type="checkbox" class="peer sr-only"><span aria-hidden="true" class="grid size-[26px] flex-none place-items-center rounded-[7px] border-2 border-tcb09-box bg-white text-white transition-colors duration-250 peer-checked:border-tcb09-acc peer-checked:bg-tcb09-acc peer-focus-visible:outline-3 peer-focus-visible:outline-offset-3 peer-focus-visible:outline-tcb09-acc motion-reduce:transition-none"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="size-[18px]"><path d="M4.5 12.5 10 18 20 6" class="transition-[stroke-dashoffset] duration-450 ease-[cubic-bezier(.6,.1,.3,1)] [stroke-dasharray:24] [stroke-dashoffset:24] group-has-checked:[stroke-dashoffset:0] motion-reduce:transition-none"/></svg></span><span><span class="block text-[15px] font-medium">Shipment dispatched</span><span class="block text-[13px] text-tcb09-mut">Ops · step 3</span></span></label>
</div>
</section>
```
## CSS
```css
@import "tailwindcss";
@theme {
--color-tcb09-bg: #f3f6f4;
--color-tcb09-bg: oklch(0.97 0.005 155);
--color-tcb09-ink: #2c352f;
--color-tcb09-ink: oklch(0.31 0.015 155);
--color-tcb09-mut: #5b675f;
--color-tcb09-mut: oklch(0.49 0.015 155);
--color-tcb09-line: #e2e8e4;
--color-tcb09-line: oklch(0.92 0.008 155);
--color-tcb09-box: #9aa89f;
--color-tcb09-box: oklch(0.7 0.018 155);
--color-tcb09-acc: #1f8a4c;
--color-tcb09-acc: oklch(0.55 0.14 152);
--font-tcb09-sans: 'Outfit', 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-09 {
width: 100%;
min-height: 100svh;
}
```How this works
Dash trick. A dash as long as the path (24 units), offset by its own length, hides the stroke; transitioning the offset to 0 draws it from start to end.
Arbitrary properties. Tailwind has no stroke-dashoffset utility, so the square-bracket property syntax writes raw declarations that still take variants: group-has-checked:[stroke-dashoffset:0].
Reduced motion removes the transition but keeps the drawn end state.
Make it yours
- Slower draw:
duration-700. - Longer paths: measure with
path.getTotalLength()and set both dash values to it. - Round box:
rounded-fullon the box. - Remove the rail for a flat checklist.
Gotchas — read before shipping
- Underscores → spaces: complex
stroke-dasharraypatterns need[stroke-dasharray:4_2]. - Set
pathLength="1"on the path if you'd rather use unitless 1 → 0 offsets. - SVG must be
aria-hidden; the checkbox carries the state.
Browser support
| Chrome | Safari | Firefox | Edge |
|---|---|---|---|
| 111+ | 16.4+ | 128+ | 111+ |
Transitioning stroke-dashoffset works in every modern engine.