Skip to content

Checkbox, Radio & Toggle

Selection controls in two sizes.

Checkbox, Radio & ToggleLive · light and dark follow the theme switch

Add the source to a shadcn project

npx shadcn@latest add https://docs.atomus.io/r/checkbox-radio-toggle.jsonOpen in v0

Installs the component source, its CSS and the Atomus tokens into components/atomus/. How the registry works

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 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

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" />

Pick any number of options, or confirm one setting that applies on submit.

  • label, description (Figma: Label, Description), size sm (16 box) · md (20 box).
  • checked/defaultChecked, onChange; indeterminate for a partial “select all”.

Pick exactly one of 2–5 options. Wrap the group in role="radiogroup" with a label.

  • The same name on each radio, a label, optional description, size sm · md.

A switch for a setting that takes effect immediately.

  • label, description, checked/onChange.
  • size sm (36×20) · md (44×24); shape pill · square (Figma: Shape).

From the Figma guidelines.

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.

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.

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.

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>).

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>).