Radio Button
Documentation for the Radio Button component.
Usage
<script>
import { RadioButton } from 'fluentui-svelte';
</script>
<RadioButton label="Option 1" /> Component API
A brief explanation of the props that really need explaining. You can see the rest of the props in the Component Props section below.
Grouping
While you can use name="inputName" to group items and have only one checked, you can use bind:group=undefined to update that variable with the value of the selected input and inspect it in your console. Read More
Disabled
The disabled prop can be used to disable a radio button, preventing user interaction.
Checked
The checked prop allows you to control the checked state of the radio button. This is useful for controlled components.
Component Props
| Name | Type | Description |
|---|---|---|
label | string | The label text for the radio button. |
group | unknown | Bindable value representing a group of radio inputs that the input will be bound to. |
checked | boolean | Indicates whether the radio button is checked. |
disabled | boolean | Indicates whether the radio button is disabled. |
ref | HTMLInputElement | Gets the DOM reference of the radio button element. |
| Element Attributes | All standard HTML attributes for input elements can be applied. |
