Radio

A radio built on a native input. Bind one shared variable with bind:group across a set of radios for exclusive selection.

Examples

Group

Show code
<Radio name="plan" value="free" bind:group={plan} label="Free" />

Disabled

Show code
<Radio label="Unavailable" disabled />

Props

PropTypeDefaultDescription
valuestring—The value this radio represents in the group.
groupstring—The selected value of the group. Bind one shared variable with bind:group.
labelstring—Visible label text beside the control.

Selected: pro. Any other attribute is spread onto the underlying radio input.