Component
RadioGroup
One choice from a small set, as native radios in a fieldset.
import { RadioGroup } from '@loidolt/theme-svelte';
Example
Notes
- An option's
descriptionrenders under its label and is read after it througharia-describedby, not as part of its name.
Props
Generated from the component source, so it cannot drift from the implementation.
| Prop | Type | Default | Notes |
|---|---|---|---|
options required | ChoiceOption<T>[] | — | Choices. A description renders under its label and is read after it. |
class | string | — | |
label | string | — | Visible group label, rendered as a <legend>. |
name | string | $props.id() | Shared name for the inputs. Defaults to an SSR-stable generated id. |
onValueChange | (value: T) => void | — | |
orientation | Orientation | 'horizontal' | |
ref bindable | HTMLFieldSetElement | null | null | |
value bindable | T | — |
Plus the attributes of HTMLFieldsetAttributes, forwarded to the root element.