Examples
Bind the group's Value; a Radio can be Disabled on its own.
Billing cycle
Selected: yearly
T can be any type; for value types such as int or an enum, give each radio an Option.
Running 3 replicas
Color and Size are set per radio.
Color.Tertiary
API
<RadioGroup<T>>
DaisyBlazorParameters
- Horizontal bool= false
Lays the radios out in a wrapping row instead of the default vertical stack.
- Label string= null
Visible caption for the group; also names the radiogroup for assistive technology (aria-labelledby).
- Value T= null
The currently selected option (two-way bindable).
- Class string= null
Extra CSS classes merged onto the root element.
- Style string= null
Inline CSS styles applied to the root element.
Events
- ValueChanged EventCallback<
T> Raised when a child Radio is selected.
Content
- ChildContent RenderFragment
The Radio components of the group, stacked vertically unless Horizontal is set.
<Radio<T>>
DaisyBlazorParameters
- Color Color= Color.Default
Radio color, mapped to daisyUI radio-{color} (Tertiary maps to radio-accent).
- Disabled bool= false
Disables the radio so it cannot be selected.
- Label string= null
Text rendered next to the radio button.
- Option T= null
Alias of Value; when set it takes precedence as the value this radio represents.
- Size Size= Size.Medium
Radio size: Small (radio-sm), Medium (default) or Large (radio-lg).
- Value T= null
The value this radio represents (MudBlazor: Value or Option).
- Class string= null
Extra CSS classes merged onto the wrapping label element.
- Style string= null
Inline CSS styles applied to the wrapping label element.
Content
- ChildContent RenderFragment
Extra content rendered inside the label after the radio and Label text.
From MudRadioGroup
RadioGroup keeps MudRadioGroup's parameter names, so most markup moves over by
dropping the Mud prefix. See the migration guide for the shared enums, icons and services.