Skip to content
uiify

Checkbox

Checkbox built on the native checkbox input.

Browsers
Chrome 123+Firefox 121+Safari 17.5+
Tier
0
Bundle compressed
448 B
Forced layout budget
0 ms
Axe budget
0
SSR compatible
Yes
Published contract
Test harness

Playground

Checkbox

Default

Indeterminate

Disabled

API

Checkbox

PropTypeDefaultDescription
id*string—Id of the native input, also used to link the label element.
labelReactNode—Label content rendered next to the input inside a wrapping label element.
checkedboolean | "indeterminate"—Checked state, making the checkbox controlled; "indeterminate" renders the mixed state.
defaultCheckedboolean—Starting checked state for the uncontrolled checkbox, which the browser then owns.
disabledbooleanfalseDisables the native input and sets the data-disabled attribute.
namestring—Name used when the checkbox is submitted with a form.
valuestring—Value submitted when the checkbox is checked.
classNamestring—Class applied to the wrapping label element when a label is given.
onCheckedChange(checked: boolean) => void—Called with the new checked state when the user toggles the checkbox.
aria-labelstring—Accessible name used when no label is given.

Keyboard

KeyAction
SpaceToggle when focused

Accessibility

Native checkbox input. Indeterminate state when applicable.

Styling hooks

data-statedata-disabled