RadioGroup
Reusable radio group component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<RadioGroup label="Choose one" name="choice" />Legacy mount name: data-component="RadioGroup".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
class | string | Optional | "" |
label | string | Optional | "Choose one" |
name | string | Optional | "choice" |
Slots
default
Events
This component does not declare a custom event.
Source contract
Installed source: components/RadioGroup.wrn
component RadioGroup {
props {
class = ""
label = "Choose one"
name = "choice"
}
view {
<fieldset class="space-y-3 {class}"><legend class="text-sm font-semibold text-slate-900 dark:text-white">{label}</legend><div class="space-y-2"><slot /></div></fieldset>
}
}