A checkbox with a spring-in fill and a drawn-on tick, plus indeterminate support. For choices a form commits later.
Checkbox playground
Install Checkbox
1. New project? One command installs the package and wires everything - see Installation:
pnpm dlx zyncat-ui init2. Import the component - it loads its own stylesheet:
import { Checkbox } from '@zyncat/ui/checkbox';Usage
import { Checkbox } from '@zyncat/ui/checkbox'; <Checkbox label="Pin post to queue" description="Published before any other scheduled items." />Compose Checkbox in your application. No Tailwind or external styling library is required; every value resolves from Zyncat UI's token vocabulary.
Checkbox props
Checkbox
Frequently asked questions
Pass indeterminate - it renders a short dash instead of the tick and visually wins over checked. It mirrors the native .indeterminate DOM property, which HTML exposes as a property rather than an attribute, so the component sets it imperatively through a ref rather than as a plain prop on the input.
A real one - the tick is an SVG path animated with stroke-dasharray/stroke-dashoffset, and it's timed to draw in slightly after the accent fill has started springing into the box, rather than both firing at once.
Pass error as a boolean - the box and tick recolor to the danger tokens and aria-invalid is set on the input, so a screen reader announces the invalid state alongside the color change. It's a single flag, not a message prop, so pair it with your own error text elsewhere in the form.
Checkbox is for a choice a form commits later, on submit; Toggle is for a setting that takes effect the instant you flip it. Both share the same label, description, checked and onChange shape, so swapping one for the other is a one-line change.