Checkbox
A checkbox, including a mixed state for partly selected groups.
Used in Workspace integrations and SaaS admin.
- Use it for
- An independent yes or no, or several items picked from a short list.
- Not for
- A setting that takes effect immediately. Try Switch or RadioGroup.
Checkbox preview
Loading example…
Installation
npm install @stackunseen/uiimport { Checkbox } from '@stackunseen/ui';@stackunseen/ui/styles.cssUsage and props
Use for an independent choice or several choices in a group. Give each checkbox a label through Field or a native label. Use indeterminate for a mixed selection. Keep checked and the mixed state separately in your app, and update the mixed state when the selection changes.
checkedboolean (optional)- The controlled checked state. Update it when the user changes the selection.
onCheckedChange(checked: boolean) => void (optional)- Receives the next checked value. Use it with checked for a controlled checkbox.
indeterminateboolean (optional)- Shows a mixed selection. It does not change checked or the submitted value.
namestring (optional)- The key used in native form data.
disabledboolean (optional)- Prevents changes and excludes the checkbox from native form submission.
All props
Loading…
For your coding agent
Give the agent this page instead of a screenshot. The prompt wraps the page with the install and import lines and the rule that your server, not a click, completes an action.
- Contract
- checked? · onCheckedChange? · indeterminate? · native checkbox props/ref
- Keeps honest
- Keep checked and the mixed state separately in your app, and update the mixed state when the selection changes.
- MCP
read_component "Checkbox"on the docs endpoint
Keyboard and customization
Keyboard
Tab focuses the checkbox; Space toggles it. Its associated label can also activate it.
Customization
Change shared colors, spacing, corners and icons with the theme. Use the component's supported props to adapt its content and layout. Customization guide and Theme Studio