View Source SaladUI.RadioGroup (SaladUI v1.0.0-beta.2)
Implementation of radio group component from https://ui.shadcn.com/docs/components/radio-group
Examples:
<.radio_group name="subscription" default="monthly" on_value_changed={JS.push("plan_changed")}>
<div class="flex flex-col space-y-2">
<div class="flex items-center space-x-2">
<.radio_group_item value="monthly" id="monthly"/>
<.label for="monthly">Monthly</label>
</div>
<div class="flex items-center space-x-2">
<.radio_group_item value="yearly" id="yearly"/>
<.label for="yearly">Yearly</label>
</div>
</div>
</.radio_group>
Summary
Functions
Radio group component that allows selection of one option from a set.
Individual radio button in a radio group.
Functions
Radio group component that allows selection of one option from a set.
Attributes
id(:string) - Defaults tonil.name(:string) - Defaults tonil.value(:any) - The current value of the radio group. Defaults tonil.default-value(:any) - The default value of the radio group. Defaults tonil.on-value-changed(:any) - Handler for value changed event. Defaults tonil.field(Phoenix.HTML.FormField) - a form field struct retrieved from the form, for example: @form[:email].class(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)
Individual radio button in a radio group.
Attributes
id(:string) (required)value(:string) (required)disabled(:boolean) - Defaults tofalse.class(:string) - Defaults tonil.- Global attributes are accepted.