Skip to content
Zuno UI
Explore components
EXPLORE
Actions
Forms
Layout
Navigation
Data display
Feedback
Overlays
RESOURCES
Components/Checkbox

Checkbox

Recognizable checked and indeterminate states, even without color.

Base UI reference ↗

Installation

Run it from the root of a project already set up with zunoui init.

npx zunoui@latest add checkbox

Dependencies

What add checkbox installs alongside the component. The CLI skips any you already have in a compatible version.

ZUNO registry

  • @zuno/utils

npm

Examples

1 examples · 1 component
checkbox

Checked, indeterminate and disabled

States recognizable by icon, not just color.

API reference

Keeps the props, events and refs of the matching Base UI primitive, plus ZUNO's styles.

PropTypeDefault
checked / defaultChecked

Controlled or initial state.

boolean—
onCheckedChange

Called when the state changes.

(checked: boolean) => void—
indeterminate

Shows the indeterminate state.

booleanfalse
disabled

Disables the control.

booleanfalse

States

The states that apply to this component and their visual treatment.

StateTreatment
RestEmpty box with an identifiable border.
Checkedchecked shows the check mark, not just color.
Indeterminateindeterminate shows a dash in addition to color.
Focus visible2 px ring outline with the keyboard.
Disableddisabled removes interaction and focus.

Accessibility

Associate a label with htmlFor and the checkbox id; the state does not rely on color alone.

The indeterminate state shows a dash in addition to color; it can be reached and toggled with the keyboard (Space).