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

PropertyTypeDefaultDescription
namestringundefinedName attribute for grouping radios
valuestringundefinedValue of the radio button
checkedbooleanfalseWhether the radio is selected
disabledbooleanfalseWhether the radio is disabled

Events

EventDescription
on:changeFired when the radio selection changes