ClassTelerikTabStrip
A tabbed navigation component with configurable placement, scrolling, and programmatic activation. Define tabs via TabStripTab in ChildContent; control active tab with ActiveTabId/ActiveTabIdChanged (or the obsolete ActiveTabIndex), and placement through TabPosition (Top/Bottom/Left/Right). Supports content persistence (PersistTabContent), scrollable tab lists (Scrollable with ScrollButtonsPosition and ScrollButtonsVisibility), alignment (TabAlignment), sizing (Size), and container dimensions (Width/Height). Keyboard navigation (Home/End/Arrow keys) and focus handling are built-in. Children: TabStripTab tags.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class TelerikTabStrip : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentTelerikTabStrip
Implements:
Inherited Members
Constructors
TelerikTabStrip()
Declaration
public TelerikTabStrip()
Properties
ActiveTabId
Sets the unique identifier of the active tab. Cannot be used together with ActiveTabIndex - choose one approach for tab activation. Throws ArgumentException when both are provided.
Declaration
[Parameter]
public string ActiveTabId { get; set; }
Property Value
ActiveTabIdChanged
Occurs when the active tab changes through user interaction or programmatic updates. Use with ActiveTabId for two-way binding (bind-ActiveTabId) to track and control tab selection by unique identifier.
Declaration
[Parameter]
public EventCallback<string> ActiveTabIdChanged { get; set; }
Property Value
ChildContent
The content of the TabStrip. Children: TabStripTab tags.
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
EnableTabReorder
Specifies whether users can reorder tabs via drag-and-drop interaction.
Declaration
[Parameter]
public bool EnableTabReorder { get; set; }
Property Value
Height
Sets the component height using any valid CSS unit (e.g., "400px", "75vh", "25em"). Controls the total TabStrip area including tabs and content regions.
Id
Sets a unique identifier for the TabStrip component instance. Useful for CSS targeting, automation testing, and accessibility scenarios where specific TabStrip identification is required.
OnStateChanged
Raises after initialization whenever the TabStrip state changes, for example when the active tab changes. Use this event to get the latest state upon changes due to user interaction. This event is not raised for the initial state (handled by OnStateInit).
Declaration
[Parameter]
public EventCallback<TabStripStateEventArgs> OnStateChanged { get; set; }
Property Value
OnStateInit
Raises when the TabStrip initializes its state, before it starts sending regular state change notifications. Use this event to inspect, customize, or restore the initial state (for example, the active tab) represented by the TabStripStateEventArgs argument.
Declaration
[Parameter]
public EventCallback<TabStripStateEventArgs> OnStateInit { get; set; }
Property Value
OnTabReorder
Occurs when a tab is reordered through drag-and-drop interaction. Provides the tab ID and its new zero-based index position after reordering.
Declaration
[Parameter]
public EventCallback<TabStripTabReorderEventArgs> OnTabReorder { get; set; }
Property Value
OverflowMode
Configures the behavior of tabs when they exceed the available space in the tab list area.
Declaration
[Parameter]
public TabStripOverflowMode OverflowMode { get; set; }
Property Value
PersistTabContent
Preserves tab content in memory when switching between tabs, avoiding content recreation.
Improves user experience for forms and complex content but increases memory usage with many tabs. Default value is false.
Declaration
[Parameter]
public bool PersistTabContent { get; set; }
Property Value
ScrollButtonsPosition
Controls where scroll buttons appear when Scrollable is enabled. Use Split (default) for buttons on both sides, Start for buttons before tabs, or End for buttons after tabs.
Declaration
[Parameter]
public TabStripScrollButtonsPosition ScrollButtonsPosition { get; set; }
Property Value
ScrollButtonsVisibility
Determines when scroll buttons are visible for scrollable TabStrips. Use Auto (default) to show buttons only when needed, Visible to always show buttons, or Hidden for mouse-only scrolling.
Declaration
[Parameter]
public TabStripScrollButtonsVisibility ScrollButtonsVisibility { get; set; }
Property Value
Scrollable
Enables horizontal scrolling when tabs exceed the available width.
Works with ScrollButtonsPosition and ScrollButtonsVisibility to control scroll button behavior. Default value is false.
Declaration
[Obsolete("The parameter is deprecated. Use OverflowMode instead with TabStripOverflowMode.Scroll value.")]
[Parameter]
public bool Scrollable { get; set; }
Property Value
Size
Controls the visual size of tabs and related elements. Use "small", "medium" (default), or "large" to match your application's design scale and improve touch accessibility.
TabAlignment
Controls how tabs are aligned within the tab list area. Use Start (default) for left-aligned tabs, Center for centered tabs, or Stretched to expand tabs equally.
Declaration
[Parameter]
public TabStripTabAlignment TabAlignment { get; set; }
Property Value
TabPosition
Controls the placement of the tab list relative to the content area. Set to Top (default) for tabs above content, Bottom for tabs below content, or Left/Right for vertical tab layouts.
Declaration
[Parameter]
public TabPosition TabPosition { get; set; }
Property Value
TabStripSuffixTemplate
Template rendered after the tab list, inside the TabStrip container. Use this template to add custom content such as action buttons, dropdowns, or additional navigation elements related to the tabs.
Declaration
[Parameter]
public RenderFragment TabStripSuffixTemplate { get; set; }
Property Value
Width
Sets the component width using any valid CSS unit (e.g., "300px", "50%", "20em"). Affects the overall TabStrip container and influences tab scrolling behavior when combined with Scrollable.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
Dispose()
Declaration
public override void Dispose()
Overrides
GetState()
Gets the current state of the TabStrip, including the active tab, the order of tabs, and the visibility and pinned settings for each tab.
Declaration
public TabStripState GetState()
Returns
Remarks
The returned TabStripState contains only UI configuration such as active tab id, tab ordering, and per-tab visibility and pinned information. It does not include tab content, user data, templates, or any underlying data source. Use this method to capture the TabStrip configuration so that it can later be restored with SetState(TabStripState).
Refresh()
Forces the TabStrip to re-render its content and update its visual state. Call this method when external data changes require the TabStrip to refresh its appearance or when tabs are dynamically modified.
Declaration
public void Refresh()
SetParametersAsync(ParameterView)
Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
parameters
Returns
Overrides
SetState(TabStripState)
Applies a previously captured TabStrip state to restore the active tab, tab order, and the visibility and pinned settings of each tab.
Declaration
public Task SetState(TabStripState state)
Parameters
state
The TabStripState to apply. If null, the method does nothing.
Returns
Remarks
This method restores the active tab, the ordering of tabs, and each tab's visibility
and pinned configuration from the provided state.
It does not recreate tabs, load or persist their content, restore templates, or
modify any underlying data source.
Tabs that exist in the component but are not present in state
keep their relative order after the restored tabs.