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
dark

Group with select all

The parent shows the mixed state while some — but not all — children are on.

light
Notify me by
dark
Notify me by

Choice cards

A Field inside a Field.Label becomes a selectable card.

light
dark