Radio
Theme-aware, responsive radio component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<Radio
size="default"
color="primary"
label="Radio"
name="name"
value="on"
/>Legacy mount name: data-component="Radio".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
size | string | Optional | "default" |
color | string | Optional | "primary" |
label | string | Optional | "Radio" |
name | string | Optional | "" |
value | string | Optional | "on" |
checked | boolean | Optional | false |
disabled | boolean | Optional | false |
class | string | Optional | "" |
Slots
This component does not declare a slot.
Events
This component does not declare a custom event.
Source contract
Installed source: components/radio.wrn
component Radio {
props {
size = "default"
color = "primary"
label = "Radio"
name = ""
value = "on"
checked = false
disabled = false
class = ""
}
view {
<label class="wire-next wire-next--color-{color} wire-next--size-{size} wire-next--choice wire-next--radio {class}">
<input {...attrs} type="radio" name="{name}" value="{value}" checked="{checked}" disabled="{disabled}" />
<span>{label}</span>
</label>
}
}