forms / stable
Checkbox
16px box with a 4px radius; cobalt fill with a check, a dash when indeterminate. CheckboxGroup collects values.
LIVE PREVIEW
Loading preview…
When to use
- Independent yes/no answers in a form that is submitted later.
- Selecting rows in a list or table (with indeterminate for “select all”).
- “Pick any” lists — wrap them in CheckboxGroup.
Consider an alternative
- Settings that apply immediately — use Switch.
- Choosing exactly one option — use RadioGroup or Select.
Import
import { Checkbox } from '@revido-llc/kit';Keyboard interaction
- Space — toggle
- Tab — move focus
Props
Props documented by the Kit. Refer to the TypeScript types for the complete interface, including inherited props.
Related exports
CheckboxGroup, CheckboxIndicator, checkboxBoxClassName
Examples
States
<Checkbox>Unchecked</Checkbox>
<Checkbox defaultSelected>Checked</Checkbox>
<Checkbox isIndeterminate>Indeterminate</Checkbox>
<Checkbox isDisabled>Disabled</Checkbox>With description
<Checkbox description="The client sees this item on the proposal.">Visible to client</Checkbox>Group
One labelled set; `value` is the array of checked values.
<CheckboxGroup label="Notify me by" value={channels} onChange={setChannels}>
<Checkbox value="email">Email</Checkbox>
<Checkbox value="slack">Slack</Checkbox>
</CheckboxGroup>Select all rows
Indeterminate when some, not all, rows are selected.
<Checkbox isSelected={all} isIndeterminate={some && !all} onChange={selectAll}>All tasks</Checkbox>Literal anatomy
Static component anatomy; bind events in the consuming app.
<CheckboxGroup label="Notifications" defaultValue={["updates"]}><Checkbox value="updates">Updates</Checkbox><Checkbox value="comments">Comments</Checkbox></CheckboxGroup>Static anatomy
A literal starting point; bind selection and validation in the consuming app.
<CheckboxIndicator isSelected isIndeterminate={false} />