Documentation

Checkbox

A compact rounded-square checkbox with a native input. The mark is smaller than its hit target; keyboard focus outlines the mark, not the surrounding row.

Props

Checkbox

PropTypeRequiredDefaultDescription
checkedbooleanYes-Whether the checkbox is checked
onClick() => voidYes-Called when checkbox is toggled
sizeSizeYes-"small" (16px mark / 24px target), "medium" (20px / 32px), "large" (24px / 40px)

Also accepts standard HTML input attributes.

StaticCheckbox

PropTypeRequiredDefaultDescription
checkedbooleanYes-Whether the checkbox appears checked
sizeSizeYes-"small", "medium", "large"

Sizes

small

medium

large

<Checkbox size="small" checked={checked} onClick={toggle} />
<Checkbox size="medium" checked={checked} onClick={toggle} />
<Checkbox size="large" checked={checked} onClick={toggle} />

States

unchecked

checked

const [checked, setChecked] = useState(false);

<Checkbox
  size="medium"
  checked={checked}
  onClick={() => setChecked(!checked)}
/>;

StaticCheckbox

Use StaticCheckbox when you need just the visual appearance without the underlying <input> element. Useful when the checkbox is part of a larger interactive component.

// Visual only - no input element
<StaticCheckbox size="medium" checked={isSelected} />

// Used within a custom list item
<ListButtonItem
  headline="Option"
  addOn={<StaticCheckbox size="medium" checked={selected} />}
  onClick={toggleSelection}
/>

With label

Checkboxes are typically paired with labels for better UX:

<Row gap="small" align="center">
  <Checkbox
    id="terms"
    size="medium"
    checked={agreed}
    onClick={() => setAgreed(!agreed)}
  />
  <label htmlFor="terms">I agree to the terms and conditions</label>
</Row>

Accessibility

  • Uses native <input type="checkbox"> for full keyboard and screen reader support
  • Visual checkbox is layered over the hidden input
  • Focus ring appears on keyboard navigation
  • The default checkmark renders immediately, without loading an icon
  • aria-checked attribute reflects current state