Radio
The Radio component allows users to select a single option from a group.
Import
<script>
import { Radio } from 'svelte-fluentui';
</script>
svelte
Basic Usage
<Radio name="size" value="small">Small</Radio>
<Radio name="size" value="medium">Medium</Radio>
<Radio name="size" value="large">Large</Radio>
svelte
Checked by Default
<Radio name="color" value="blue" checked>Blue</Radio>
<Radio name="color" value="red">Red</Radio>
svelte
Disabled State
<Radio name="option" value="disabled" disabled>Disabled option</Radio>
svelte
Properties
Property | Type | Default | Description |
---|---|---|---|
name | string | undefined | Name attribute for grouping radios |
value | string | undefined | Value of the radio button |
checked | boolean | false | Whether the radio is selected |
disabled | boolean | false | Whether the radio is disabled |
Events
Event | Description |
---|---|
on:change | Fired when the radio selection changes |