Accordion

This documentation provides a comprehensive reference for the Accordion component, guiding you through its configuration options.
Demos

Screenshot #

Blazor Accordion Component

Accordion 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. 1.0.0
AlwaysOpen bool False If true, accordion items stay open when another item is opened. 1.7.0
ChildContent RenderFragment? null Gets or sets the content to be rendered within the component. 1.7.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 1.0.0
Flush bool False If true, removes borders and rounded corners to render accordions edge-to-edge with their parent container. 1.7.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 1.0.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 1.0.0

Accordion Methods #

Name Return type Description Added Version
HideAccordionItemByIndexAsync(int index) Task Hides the AccordionItem by index. 1.10.5
HideAccordionItemByNameAsync(string accordionItemName) Task Hides the AccordionItem by name. 1.10.5
HideAllAccordionItemsAsync() Task Hides all AccordionItem instances. 1.10.5
HideFirstAccordionItemAsync() Task Hides the first AccordionItem. 1.10.5
HideLastAccordionItemAsync() Task Hides the last AccordionItem. 1.10.5
ShowAccordionItemByIndexAsync(int index) Task Shows the AccordionItem by index. 1.7.0
ShowAccordionItemByNameAsync(string accordionItemName) Task Shows the AccordionItem by name. 1.7.0
ShowAllAccordionItemsAsync() Task Shows all AccordionItem instances if AlwaysOpen is true. 1.10.5
ShowFirstAccordionItemAsync() Task Shows the first AccordionItem. 1.7.0
ShowLastAccordionItemAsync() Task Shows the last AccordionItem. 1.7.0

Accordion Events #

Name Return Type Description Added Version
OnHidden EventCallback<AccordionEventArgs> This event is fired when a accordion item has been hidden from the user (will wait for CSS transitions to complete). 1.7.0
OnHiding EventCallback<AccordionEventArgs> This event is fired immediately when the hide method has been called. 1.7.0
OnShowing EventCallback<AccordionEventArgs> This event fires immediately when the show method is called. 1.7.0
OnShown EventCallback<AccordionEventArgs> This event is fired when a accordion item has been made visible to the user (will wait for CSS transitions to complete). 1.7.0

AccordionEventArgs Properties #

Name Type Default Required Description Added Version
Name string null Gets the AccordionItem name. 1.7.0
Title string null Gets the AccordionItem title. 1.7.0

AccordionItem Parameters #

Name Type Default Required Description Added Version
Active bool False Gets or sets the active state. 1.7.0
AdditionalAttributes Dictionary<string, object>? null Gets or sets additional attributes that will be applied to the component. 1.0.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 1.0.0
Content RenderFragment? null Gets or sets the content to be rendered within the component. 1.7.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 1.0.0
Name string? null Gets or sets the name. 1.7.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 1.0.0
Title string? null Gets or sets the title. 1.7.0
TitleTemplate RenderFragment? null Gets or sets the title template. 1.7.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.