Controls
Checkbox
On, off or mixed, with a check that draws itself on.
npx shadcn-svelte@latest add http://localhost:5173/r/checkbox.json States
The check draws itself on; unchecking fades it out. Presses shrink the box slightly. Hover, pressed and focus rows are pinned.
light
Off · on · mixed
Pressed
Focus
Invalid
Disabled
dark
Off · on · mixed
Pressed
Focus
Invalid
Disabled
With a label
In a horizontal Field the label and description are wired up automatically; clicking the label toggles the box.
light
You agree to our Terms of Service and Privacy Policy.
Required to continue.
dark
You agree to our Terms of Service and Privacy Policy.
Required to continue.
Group with select all
The parent shows the mixed state while some — but not all — children are on.
light
dark
Choice cards
A Field inside a Field.Label becomes a selectable card.
light
dark