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
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | The value this radio represents in the group. |
group | string | — | The selected value of the group. Bind one shared variable with bind:group. |
label | string | — | Visible label text beside the control. |
Selected: pro. Any other attribute is spread onto the
underlying radio input.