Radio
Radio buttons let users select exactly one option from a mutually exclusive set.
Overview
catnip-radio is a form-associated custom element for one option (circle + label text in the default slot), with optional supporting text below the row for errors or hints. The visible circle matches the Figma radio button spec (sizes m / l, checked, disabled, read-only, and danger validation). For a labelled group with shared supporting copy and mutually exclusive selection logic, use Radio Group. Shared field patterns are summarised on Inputs overview.
The visible ring, selected dot, and focus treatment use concentric vector geometry so they remain circular and centred across browser zoom levels.
Live example
Guidelines
When to use
| Control | Use for |
|---|---|
Radio (catnip-radio) | A single mutually exclusive option. |
Radio Group (catnip-radio-group) | Multiple related mutually exclusive options with a field label, options + modelValue, and group-level supporting text. |
Checkbox (catnip-checkbox) | A single independent option: consent line, standalone boolean. |
Checklist (catnip-checklist) | Multiple related independent options. |
Don't build a set of options from separate catnip-radio elements, even with a shared name: they don't form a group (no arrow keys, one Tab stop each). Use catnip-radio-group; see Accessibility.
Option row
catnip-radio exposes option label text in the default slot (or aria-label when the slot is empty). It does not include a field label or group legend — use catnip-radio-group for that.
Optional supporting-text renders below the radio row (not inside the clickable label), for per-option hints or validation — matching Figma Radio button with an info message.
Read-only
Use readonly when the selected state must remain reviewable but cannot be changed. For a set of options, set readonly on catnip-radio-group instead. Use disabled when the option should leave the keyboard interaction model entirely. Accessibility explains how a read-only radio is exposed.
Validation
- Single radio: set
intent="danger"andsupporting-texton the host; the input setsaria-invalid. - Radio groups: put the group label and field-level
supporting-textoncatnip-radio-group. SetintentandsupportingTexton the matchingoptionsrow when one option is invalid.