Skip to content

Radio Group ​

A radio group is a field control for choosing exactly one value from a short list of mutually exclusive options on the page — matching Figma Radio button Examples (group label + several radio inputs + validation copy).

Overview ​

Pass options (array of { value, label?, … }) and bind modelValue as a single selected value.

catnip-radio-group also provides:

  • Field label (prop or label slot), required / optional markers, info tooltip
  • supporting-text below the group (validation, hints)
  • role="radiogroup" with aria-labelledby / aria-describedby wiring

Use a single catnip-radio when you only need one option rendered without a field group. Use catnip-dropdown for long lists in a compact panel.

Per-option errors ​

Set intent and supportingText on each options row for row-level validation. Set intent and supporting-text on the radio group for group-level copy. The live example shows Option A in danger with supporting text.

See Guidelines — Validation for a dynamic pattern.

Live example ​

Guidelines ​

When to use ​

PatternUse
catnip-radio-groupLabelled single-select from an options array (Figma Radio button Examples).
catnip-radio aloneSingle option, or a row you place yourself outside a radio group.
catnip-dropdownMany options in a compact panel.

Binding ​

vue
<catnip-radio-group
  label="Choose one"
  required
  intent="danger"
  supporting-text="Resolve the option-level errors below."
  .options="options"
  .modelValue="selected"
  @update:modelValue="selected = $event.detail[0] ?? $event.detail"
/>
js
const selected = ref("a");

const options = ref([
  {
    value: "a",
    label: "Option A",
    intent: "danger",
    supportingText: "Error message"
  },
  { value: "b", label: "Option B" },
  { value: "c", label: "Option C" }
]);

Bind .options and .modelValue on the host (see Component API). Toggling updates modelValue on the radio group host.

Validation (group + per option) ​

Use two levels:

LevelSet onExample
Groupcatnip-radio-group → intent, supporting-text“Select a valid option.”
RowEach options[] item → intent, supportingText“This option is currently unavailable.”

Per-row intent is only neutral or danger (same as catnip-radio). Group intent also supports warning and success for the field supporting-text block.

Static row errors ​

Put intent and supportingText directly on the option object.

supportingText on an option accepts a string, string[], { text, intent?, icon? }, or an array of those objects. See supporting-text examples.

Catnip Design System by Signicat