Checkbox
Checkbox
Section titled “Checkbox”Category: Forms & inputs
<Checkbox>Subscribe to updates</Checkbox><Checkbox isIndeterminate>Select all</Checkbox>Install: @helix-ui/core
import { Checkbox } from '@helix-ui/core';status: stable · since: 0.1.0
Tags: boolean, toggle, multi-select, form
Live playground
Section titled “Live playground”Open the full editor or source on GitHub.
Anatomy
Section titled “Anatomy”[ ☐ ] Label ← unchecked[ ☑ ] Label ← checked[ ▣ ] Label ← indeterminateLayout
Section titled “Layout”- display —
inline-flex - width —
content - height —
content - intrinsicSize —
~20px box + label gap - stackable —
true - fullBleed —
false
Visual
Section titled “Visual”A small rounded square (radius.sm) that fills with brand color when checked, with a white check glyph. Indeterminate state shows a horizontal bar. Label sits to the right with space.2 gap.
| Name | Type | Default | Description |
|---|---|---|---|
isSelected |
boolean |
false |
Controlled checked state. |
defaultSelected |
boolean |
false |
Uncontrolled initial state. |
isIndeterminate |
boolean |
false |
Shows a dash glyph indicating mixed state. |
isRequired |
boolean |
false |
Marks required for validation. |
isInvalid |
boolean |
false |
Forces invalid state. |
isDisabled |
boolean |
false |
Disables interaction. |
onChange |
(isSelected: boolean) => void |
— | Change handler. |
...rest |
CheckboxProps from react-aria-components |
— | All forwarded. |
- children — visible label text
Tokens used
Section titled “Tokens used”color.bg.surface.default, color.bg.action.brand.default, color.text.primary, color.text.on.brand, color.border.strong, color.border.focus, color.border.danger, radius.sm, space.2, font.family.sans, font.size.sm
Accessibility
Section titled “Accessibility”Role: checkbox
Keyboard
| Key | Action |
|---|---|
Space |
Toggles the checkbox. |
Notes
- Built on react-aria-components Checkbox — full keyboard, screen-reader, and indeterminate handling.
- For groups of related options, use CheckboxGroup (follow react-aria-components).
Composes with
Section titled “Composes with”| Component | Relation | Note |
|---|---|---|
Field |
parent |
Use Field if you need separate label/description structure. |
Form |
parent |
Submitted as part of a Form. |
Switch |
sibling |
|
RadioGroup |
sibling |
Prompt examples
Section titled “Prompt examples”These are the AI prompt → JSX mappings used by the helix-ui prompt DSL and integrations like Cursor / Claude Code.
agree-to-terms
Section titled “agree-to-terms”“checkbox to accept terms”
<Checkbox isSelected={ok} onChange={setOk}> I agree to the terms</Checkbox>select all in a table
Section titled “select all in a table”“header checkbox with indeterminate when partially selected”
<Checkbox isIndeterminate={partial} isSelected={all} onChange={toggleAll}> Select all</Checkbox>