Checkbox, Radio & Toggle
Selection controls in two sizes.
Add the source to a shadcn project
npx shadcn@latest add https://docs.atomus.io/r/checkbox-radio-toggle.jsonOpen in v0Installs the component source, its CSS and the Atomus tokens into components/atomus/. How the registry works
In Figma
Section titled “In Figma”From guidelines/components/checkbox-radio.md, guidelines/components/toggle.md · Open in Figma: Checkbox · Radio · Toggle
Properties, variants and anatomy of the Figma components. React props use the same names.
Checkbox
Section titled “Checkbox”Checkbox with optional label and description.
Variants: 24
| Property | Type / options |
|---|---|
| Label | text |
| Show label | boolean (on) |
| Description | text |
| Show description | boolean (off) |
| Size | sm · md |
| Checked | False · True · Indeterminate |
| State | Default · Hover · Focused · Disabled |
Radio button for groups of mutually exclusive options.
Variants: 16
| Property | Type / options |
|---|---|
| Label | text |
| Show label | boolean (on) |
| Description | text |
| Show description | boolean (off) |
| Size | sm · md |
| Checked | False · True |
| State | Default · Hover · Focused · Disabled |
Toggle
Section titled “Toggle”On/off switch for settings that apply immediately.
Variants: 32
| Property | Type / options |
|---|---|
| Label | text |
| Show label | boolean (on) |
| Description | text |
| Show description | boolean (off) |
| Shape | Pill · Square |
| Size | sm · md |
| Checked | False · True |
| State | Default · Hover · Focused · Disabled |
import { Checkbox, Radio, Toggle } from '@stanvision/atomus-react';
<Checkbox label="Email me updates" defaultChecked /><Radio name="plan" label="Pro" description="Unlimited projects" /><Toggle label="Dark mode" size="md" />Checkbox
Section titled “Checkbox”Pick any number of options, or confirm one setting that applies on submit.
label,description(Figma: Label, Description),sizesm(16 box) ·md(20 box).checked/defaultChecked,onChange;indeterminatefor a partial “select all”.
Pick exactly one of 2–5 options. Wrap the group in role="radiogroup" with a label.
- The same
nameon each radio, alabel, optionaldescription,sizesm·md.
Toggle
Section titled “Toggle”A switch for a setting that takes effect immediately.
label,description,checked/onChange.sizesm(36×20) ·md(44×24);shapepill·square(Figma: Shape).
Design guidance
Section titled “Design guidance”From the Figma guidelines.
Checkbox
Section titled “Checkbox”Do
- Use for multiple independent choices.
- Use Indeterminate for a partially selected group.
- Turn on Description only when the label needs explaining.
Forbidden
- Never use a checkbox for a setting that applies instantly — use Toggle.
- Never write negative labels (“Don’t send emails”).
- Never nest checkboxes more than one level.
Do
- Use for one choice from 2–5 visible options.
- Preselect a sensible default when there is one.
Forbidden
- Never use a single radio on its own — use Checkbox.
- Never use radios for more than about five options — use Select.
Toggle
Section titled “Toggle”Do
- Use for settings that apply immediately.
- Write the label as the setting (“Email notifications”).
- Use one shape across the product.
Forbidden
- Never use a toggle in a form that needs Save — use Checkbox.
- Never use a toggle for more than two states.
- Never hide the label.
React API
Section titled “React API”Generated from react/src/components by scripts/gen-react-api.mjs — the same tables agents read in guidelines/components/checkbox-radio.md, guidelines/components/toggle.md.
Use only these props; anything else is not part of the API.
Checkbox
Section titled “Checkbox”import { Checkbox } from '@stanvision/atomus-react'; — source: react/src/components/Choice.tsx
| Prop | Type | Default | Description |
|---|---|---|---|
label |
string |
— | Figma: Label (+ Show label) |
description |
string |
— | Figma: Description (+ Show description) |
size |
'sm' | 'md' |
'sm' |
Figma: Size — sm (16 control, 14px label) · md (20 control, 16px label) |
indeterminate |
boolean |
— | Figma: Checked=Indeterminate |
Also accepts every native <input> attribute (name, value, checked, onChange, required …), except size, type, which are replaced above, and ref (forwarded to the <input>).
import { Radio } from '@stanvision/atomus-react'; — source: react/src/components/Choice.tsx
| Prop | Type | Default | Description |
|---|---|---|---|
label |
string |
— | Figma: Label (+ Show label) |
description |
string |
— | Figma: Description (+ Show description) |
size |
'sm' | 'md' |
'sm' |
Figma: Size — sm (16 control, 14px label) · md (20 control, 16px label) |
Also accepts every native <input> attribute (name, value, checked, onChange, required …), except size, type, which are replaced above, and ref (forwarded to the <input>).
Toggle
Section titled “Toggle”import { Toggle } from '@stanvision/atomus-react'; — source: react/src/components/Choice.tsx
| Prop | Type | Default | Description |
|---|---|---|---|
label |
string |
— | Figma: Label (+ Show label) |
description |
string |
— | Figma: Description (+ Show description) |
size |
'sm' | 'md' |
'sm' |
Figma: Size — sm (16 control, 14px label) · md (20 control, 16px label) |
shape |
'pill' | 'square' |
'pill' |
Figma: Shape |
Also accepts every native <input> attribute (name, value, checked, onChange, required …), except size, type, which are replaced above, and ref (forwarded to the <input>).