# SbRadioGroup A container component for grouping radio buttons, managing the selected value across multiple SbRadio children. ## Parameters | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | Value | TValue? | null | The selected value (two-way bindable) | | ValueChanged | EventCallback\ | - | Callback when selection changes | | Name | string? | auto-generated | Name attribute for the radio inputs (when null, a GUID is used) | | Label | string? | null | Visible label for the group (e.g. "Select Plan"); also used as aria-label when AriaLabel is not set | | AriaLabel | string? | null | Accessible label for the group (when null, Label is used) | | Disabled | bool | false | Whether all radios in the group are disabled | | Orientation | SbOrientation | SbOrientation.Vertical | Layout direction (Vertical or Horizontal) | | Class | string? | null | Additional CSS classes | | Style | string? | null | Inline styles | | AdditionalAttributes | Dictionary\? | null | Additional HTML attributes (CaptureUnmatchedValues) | ## Events | Event | Type | Description | |-------|------|-------------| | ValueChanged | EventCallback\ | Fired when the selected value changes | ## Templates / Slots (RenderFragments) | Slot | Type | Description | |------|------|-------------| | ChildContent | RenderFragment | SbRadio components to include in the group | ### Template Usage Examples ```razor ``` ## CSS Classes - `sb-radio-group` - Base class - `sb-radio-group--vertical` - Vertical layout (default) - `sb-radio-group--horizontal` - Horizontal layout - `sb-radio-group__label` - Group label - `sb-radio-group--disabled` - Disabled state ## Accessibility - Radio buttons share the same `name` attribute for native grouping - Keyboard navigation: Arrow keys to move between options - Only one option selectable at a time ## Examples ### Basic Usage ```razor ``` ### Horizontal Layout ```razor @for (int i = 1; i <= 5; i++) { } ``` ### With Descriptions ```razor
Standard Shipping 5-7 business days - Free
Express Shipping 2-3 business days - $9.99
Overnight Shipping Next business day - $24.99
``` ### Disabled Group ```razor ``` ### Individual Disabled Options ```razor ``` ### Enum Binding ```razor @foreach (var priority in Enum.GetValues()) { } @code { public enum Priority { Low, Medium, High, Critical } private Priority taskPriority = Priority.Medium; } ```