Browse components

Radio

Single radio input for mutually exclusive choices. Use RadioGroup when you want arrow-key navigation and one bindable value for the set.

atoms

Live example

Default usage you can copy and adapt.

Default

Use a label and a shared name to form a native radio group.

Pick a plan (native grouping via shared name).

Selected: basic

Group usage

Use RadioGroup for options arrays, a semantic fieldset/legend, and roving focus with arrow keys.

Billing cadence

Disabled state

Disable either the whole group or individual options to prevent selection.

Notifications (disabled group)
Notifications (disabled option)

Realistic form

Bind the selected value and use it to drive UI (e.g. helper copy or conditional fields).

Choose a plan

Summary

Selected plan: team

Props

The props you are most likely to need, with types and defaults.

Props / API
NameTypeRequiredDefaultDescription
idstringNogeneratedStable id; generated when omitted
namestringNo—Radio group name (native HTML grouping)
valuestringNo—Radio value submitted with forms
labelstringNo—Visible label text
checkedbooleanNofalseControlled checked state (supports bind:checked)
defaultCheckedbooleanNofalseInitial checked state for uncontrolled usage
disabledbooleanNofalseDisable the radio
onChange(event: Event) => voidNoundefinedChange handler (alias: onchange)
onchange(event: Event) => voidNoundefinedAlias for onChange