Showcase

Blazor List Group

This documentation provides a comprehensive reference for the ListGroup, ListGroupItem, and ListGroupTabPane components, guiding you through their configuration options.
Demos

Screenshot #

Blazor ListGroup Component

ListGroup 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 list, read by screen readers. A listbox (Single, Multiple) and a tab list need it, or aria-labelledby. 4.1.0
ChildContent RenderFragment? null Gets or sets the content: ListGroupItem components in static mode, or ListGroupTabPane components in tab mode. 4.1.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 4.1.0
Data IEnumerable<object?>? null Gets or sets the items to render in data-bound mode. When set, ChildContent is ignored. 4.1.0
Disabled bool False Gets or sets whether every item is disabled. 4.1.0
DisabledSelector Func<object?, bool>? null Gets or sets a function that returns whether a data-bound item is disabled. 4.1.0
Fade bool True Gets or sets whether tab panes fade in and out. Applies in tab mode. 4.1.0
Flush bool False Gets or sets whether the outer borders and rounded corners are removed, so the list sits edge to edge in its parent. Ignored when Horizontal is set. 4.1.0
Horizontal bool False Gets or sets whether the items are laid out in a row instead of a column, from HorizontalBreakpoint up. 4.1.0
HorizontalBreakpoint ListGroupHorizontalBreakpoint Always Gets or sets the breakpoint from which a horizontal list lays its items out in a row. 4.1.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 4.1.0
ItemTemplate RenderFragment<object?>? null Gets or sets the template of a data-bound item. Takes precedence over TextField. 4.1.0
Numbered bool False Gets or sets whether the items are numbered. 4.1.0
SelectedItem object? null Gets or sets the selected item. Applies when SelectionMode is Single or Radio. 4.1.0
SelectedItemExpression Expression<Func<object?>>? null Gets or sets the expression that identifies the bound selected item for validation and EditContext notifications. 4.1.0
SelectedItems IEnumerable<object?>? null Gets or sets the selected items. Applies when SelectionMode is Multiple or Checkbox. 4.1.0
SelectedItemsExpression Expression<Func<IEnumerable<object?>?>>? null Gets or sets the expression that identifies the bound selected items for validation and EditContext notifications. 4.1.0
SelectionMode ListGroupSelectionMode None Gets or sets how items are selected. 4.1.0
StretchedLink bool False Gets or sets whether the whole row of a checkbox or radio item toggles it, not only the input and its label. 4.1.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 4.1.0
TabContentClass string col-md-8 Gets or sets the CSS class of the column that holds the tab panes. Applies in tab mode. 4.1.0
TabListClass string col-md-4 Gets or sets the CSS class of the column that holds the tab list. Applies in tab mode. 4.1.0
TabMode bool False Gets or sets whether the items act as tabs that switch the ListGroupTabPane children. 4.1.0
TextField Func<object?, string>? null Gets or sets a function that returns the text of a data-bound item, when there is no ItemTemplate. 4.1.0

ListGroup Methods #

Name Return type Description Added Version
ShowTabAsync(string name) Task Shows the tab pane with the given name. Applies in tab mode. 4.1.0

ListGroup Events #

Name Return Type Description Added Version
OnHidden EventCallback<ListGroupTabEventArgs> This event fires after a tab pane is hidden. Applies in tab mode. 4.1.0
OnHiding EventCallback<ListGroupTabEventArgs> This event fires when a tab pane starts to hide. Applies in tab mode. 4.1.0
OnItemClick EventCallback<object?> This event fires when the user clicks an item. Items become buttons when it is set. 4.1.0
OnShowing EventCallback<ListGroupTabEventArgs> This event fires when a tab pane starts to show. Applies in tab mode. 4.1.0
OnShown EventCallback<ListGroupTabEventArgs> This event fires after a tab pane is shown. Applies in tab mode. 4.1.0
SelectedItemChanged EventCallback<object?> This event fires when the user selects a different item. 4.1.0
SelectedItemsChanged EventCallback<IEnumerable<object?>> This event fires when the user selects or deselects an item. The new set keeps the existing order, with a newly selected item added at the end. 4.1.0

ListGroupItem Parameters #

Name Type Default Required Description Added Version
Active bool False Gets or sets whether the item is active, marked with aria-current="true". Applies when the group is not selectable; a selectable group marks its selected items instead. 4.1.0
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 item. In checkbox and radio modes it names the input; set it when the item has no visible text. 4.1.0
ChildContent RenderFragment? null Gets or sets the content of the item: text or any markup. 4.1.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 4.1.0
Color ListGroupColor None Gets or sets the contextual color of the item. 4.1.0
Disabled bool False Gets or sets whether the item is disabled. The item is also disabled when its group is disabled. 4.1.0
Href string? null Gets or sets the URL of the item, which makes it a link. A disabled link has no href and is marked aria-disabled="true". Applies when the group is not selectable. 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
Value object? null Gets or sets the value of the item. Selection and OnItemClick report it. 4.1.0

ListGroupItem Events #

Name Return Type Description Added Version
OnClick EventCallback<MouseEventArgs> This event fires when the user clicks the item, which makes it a button. Applies when the group is not selectable. 4.1.0

ListGroupTabPane Parameters #

Name Type Default Required Description Added Version
Active bool False Gets or sets whether this pane is shown when the group first renders. When no pane sets it, the first enabled pane is shown. 4.1.0
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 pane. 4.1.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 4.1.0
Disabled bool False Gets or sets whether the pane's tab 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
Name string null Gets or sets the unique name of the pane. Tab events report it, and ShowTabAsync takes it. 4.1.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 4.1.0
Title string? null Gets or sets the text of the pane's tab. TitleTemplate takes precedence. 4.1.0
TitleTemplate RenderFragment? null Gets or sets the content of the pane's tab, such as text with a badge. 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.