GitHubnpm

Accent theme

Base radius

GitHubnpm

Accent theme

Base radius

Colour scheme

Docs menu

Guides


Primitives
Forms
Layout
Feedback
Overlays
Navigation
Data Display
AI

Checkbox

A real <input type="checkbox">. The visible box is a decorative sibling <span>, styled with :checked and :indeterminate, the input itself stays exactly where you click, invisibly, so focus, keyboard toggling, and the accessibility tree all come from the real element.

Playground

Toggle every adjustable prop and watch the component — and the code — update live.

Unstyled

Same component — Kernel look stripped. See Platforms.

checked
indeterminate
required
disabled
Usage
<Checkbox>Accept terms</Checkbox>

Props

Props for Checkbox.
PropTypeDefault
checked / defaultCheckedbooleanfalse
indeterminatebooleanfalse
onCheckedChange(checked: boolean) => void

Accessibility

  • indeterminate sets the DOM property directly, there's no HTML attribute for it, so :indeterminate in CSS works without any extra data attributes.
  • Space toggles it, clicking the label text toggles it, both for free.