Showcase

ButtonGroup

This documentation provides a comprehensive reference for the ButtonGroup, ButtonToolbar, RadioButtonGroup, CheckboxButtonGroup, and ButtonGroupItem components, guiding you through their configuration options.
Demos

Screenshot #

Blazor ButtonGroup Component

ButtonGroup Parameters #

Name Type Default Required Description Added Version
AdditionalAttributes Dictionary<string, object>? null Gets or sets additional attributes that will be applied to the component. 4.1.0
AriaLabel string? null Gets or sets the accessible name of the group, read by screen readers. To name the group by visible text instead, set aria-labelledby; it takes precedence. 4.1.0
ChildContent RenderFragment? null Gets or sets the content of the group: buttons, links, nested groups, or dropdowns. 4.1.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 4.1.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 4.1.0
Size ButtonGroupSize None Gets or sets the size of every button in the group, nested groups included. 4.1.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 4.1.0
Vertical bool False Gets or sets whether the buttons are stacked vertically instead of horizontally. Split button dropdowns are not supported in a vertical group. 4.1.0

ButtonToolbar Parameters #

Name Type Default Required Description Added Version
AdditionalAttributes Dictionary<string, object>? null Gets or sets additional attributes that will be applied to the component. 4.1.0
AriaLabel string? null Gets or sets the accessible name of the toolbar, read by screen readers. To name the toolbar by visible text instead, set aria-labelledby; it takes precedence. 4.1.0
ChildContent RenderFragment? null Gets or sets the content of the toolbar: button groups and input groups. 4.1.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 4.1.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 4.1.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 4.1.0

RadioButtonGroup Parameters #

Name Type Default Required Description Added Version
AdditionalAttributes Dictionary<string, object>? null Gets or sets additional attributes that will be applied to the component. 4.1.0
AriaLabel string? null Gets or sets the accessible name of the group, read by screen readers. To name the group by visible text instead, set aria-labelledby; it takes precedence. 4.1.0
ChildContent RenderFragment? null Gets or sets the choices of the group: ButtonGroupItem components. 4.1.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 4.1.0
Color ButtonColor Primary Gets or sets the default color of the buttons. An item's Color overrides it. 4.1.0
Disabled bool False Gets or sets whether every button in the group is disabled. 4.1.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 4.1.0
Outline bool True Gets or sets whether the buttons use the outline style by default. An item's Outline overrides it. 4.1.0
Size ButtonGroupSize None Gets or sets the size of every button in the group. 4.1.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 4.1.0
Value object? null Gets or sets the selected value. 4.1.0
ValueExpression Expression<Func<object?>> null Gets or sets the expression that identifies the bound value for validation and EditContext notifications. 4.1.0
Vertical bool False Gets or sets whether the buttons are stacked vertically instead of horizontally. 4.1.0

RadioButtonGroup Events #

Name Return Type Description Added Version
ValueChanged EventCallback<object?> This event fires when the user selects a different value. 4.1.0

CheckboxButtonGroup Parameters #

Name Type Default Required Description Added Version
AdditionalAttributes Dictionary<string, object>? null Gets or sets additional attributes that will be applied to the component. 4.1.0
AriaLabel string? null Gets or sets the accessible name of the group, read by screen readers. To name the group by visible text instead, set aria-labelledby; it takes precedence. 4.1.0
ChildContent RenderFragment? null Gets or sets the choices of the group: ButtonGroupItem components. 4.1.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 4.1.0
Color ButtonColor Primary Gets or sets the default color of the buttons. An item's Color overrides it. 4.1.0
Disabled bool False Gets or sets whether every button in the group is disabled. 4.1.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 4.1.0
Outline bool True Gets or sets whether the buttons use the outline style by default. An item's Outline overrides it. 4.1.0
Size ButtonGroupSize None Gets or sets the size of every button in the group. 4.1.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 4.1.0
Values IEnumerable<object?>? null Gets or sets the selected values. 4.1.0
ValuesExpression Expression<Func<IEnumerable<object?>?>> null Gets or sets the expression that identifies the bound values for validation and EditContext notifications. 4.1.0
Vertical bool False Gets or sets whether the buttons are stacked vertically instead of horizontally. 4.1.0

CheckboxButtonGroup Events #

Name Return Type Description Added Version
ValuesChanged EventCallback<IEnumerable<object?>> This event fires when the user checks or unchecks a button. The new set keeps the existing order, with a newly checked value added at the end. 4.1.0

ButtonGroupItem Parameters #

Name Type Default Required Description Added Version
AdditionalAttributes Dictionary<string, object>? null Gets or sets additional attributes that will be applied to the component. 4.1.0
ChildContent RenderFragment? null Gets or sets the content of the button. Takes precedence over Text. 4.1.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 4.1.0
Color ButtonColor? null Gets or sets the color of this button. When null, the group's color is used. 4.1.0
Disabled bool False Gets or sets whether this button is disabled. The button is also disabled when its group is disabled. 4.1.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 4.1.0
Outline bool? null Gets or sets whether this button uses the outline style. When null, the group's setting is used. 4.1.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 4.1.0
Text string? null Gets or sets the text of the button. ChildContent takes precedence. 4.1.0
Value object? null Gets or sets the value this button selects. 4.1.0

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.