Tabs

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

Screenshot #

Blazor Tabs Component

Tabs 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
ChildContent RenderFragment? null Gets or sets the content to be rendered within the component. 1.0.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 1.0.0
EnableFadeEffect bool False Gets or sets the tabs fade effect. 1.0.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 1.0.0
NavStyle NavStyle Tabs Get or sets the nav style. 1.0.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 1.0.0

Tabs Methods #

Name Return type Description Added Version
GetActiveTab() Tab Gets the active tab. 3.0.0
RemoveTabByIndex(int tabIndex) Void Removes the tab by index. 2.2.0
RemoveTabByName(string tabName) Void Removes the tab by name. 2.2.0
ShowFirstTabAsync() Task Selects the first tab and show its associated pane. 1.0.0
ShowLastTabAsync() Task Selects the last tab and show its associated pane. 1.0.0
ShowRecentTab() Void Shows the recently added tab. 2.2.0
ShowTabByIndexAsync(int tabIndex) Task Selects the tab by index and show its associated pane. 1.0.0
ShowTabByNameAsync(string tabName) Task Selects the tab by name and show its associated pane. 1.0.0

Tabs Events #

Name Return Type Description Added Version
OnHidden EventCallback<TabsEventArgs> This event fires after a new tab is shown (and thus the previous active tab is hidden). 1.0.0
OnHiding EventCallback<TabsEventArgs> This event fires when a new tab is to be shown (and thus the previous active tab is to be hidden). 1.0.0
OnShowing EventCallback<TabsEventArgs> This event fires on tab show, but before the new tab has been shown. 1.0.0
OnShown EventCallback<TabsEventArgs> This event fires on tab show after a tab has been shown. 1.0.0

TabsEventArgs Properties #

Name Type Default Required Description Added Version
ActiveTabName string null Gets the active Tab name. 1.0.0
ActiveTabTitle string null Gets the active Tab title. 1.0.0
PreviousActiveTabName string null Gets the previous active Tab name. 1.0.0
PreviousActiveTabTitle string null Gets the previous active Tab title. 1.0.0

Tab Parameters #

Name Type Default Required Description Added Version
Active bool False Gets or sets the active state. 1.0.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.0.0
Disabled bool False Gets or sets the disabled state. 1.0.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 tab name. 1.0.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 tab title. 1.0.0
TitleTemplate RenderFragment? null Gets or sets the tab title template. 1.0.0

Tab Events #

Name Return Type Description Added Version
OnClick EventCallback<TabEventArgs> This event fires when the user clicks the corresponding tab button and the tab is displayed. 1.11.0

TabEventArgs Properties #

Name Type Default Required Description Added Version
Name string null Gets the Tab name. 1.0.0
Title string null Gets the Tab title. 1.0.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.