Checkbox
Native checkbox input styled to match the design system, with controlled and uncontrolled support.
npx @slipstream-ui/cli@latest add checkboxStates
Form groups
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| checked | boolean | — | Controlled checked state; omit for uncontrolled usage. |
| defaultChecked | boolean | false | Initial checked state when uncontrolled. |
| onCheckedChange | (checked: boolean) => void | — | Fired when the user toggles the checkbox. |
| disabled | boolean | false | Disables the checkbox. |
| required | boolean | false | Marks the checkbox as required for form validation. |
| name / value | string | — | Form participation when submitted natively (name + value pair). |
Accessibility
- Native input semantics: keyboard, form, and screen-reader behavior is identical to platform checkboxes.
- Provide an accessible name via an associated <Label> or aria-label.
- Disabled state is announced natively; keep a visible label so the state is readable.
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+ — macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA — the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.