# TabStrip Events

This article explains the events available in the Telerik TabStrip for Blazor:

* [`ActiveTabIdChanged`](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/events#activetabidchanged)
* [`OnStateChanged`](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/events#onstatechanged)
* [`OnStateInit`](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/events#onstateinit)
* [`OnTabDrop`](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/events#ontabdrop)
* [`OnTabReorder`](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/events#ontabreorder)
* [`PinnedChanged`](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/events#pinnedchanged)
* [`VisibleChanged`](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/events#visiblechanged)

## ActiveTabIdChanged

The `ActiveTabIdChanged` event was added in [version 9.0.0](https://www.telerik.com/support/whats-new/blazor-ui/release-history/telerik-ui-for-blazor-9-0-0-\(2025-q2\)). It fires when the user changes the active tab. The event handler receives the new tab `Id` as a `string` argument. If the `Id` parameter of the `TabStripTab` is not set, the component generates a `Guid` automatically during initialization.

The `ActiveTabIdChanged` event is designed to work with the `ActiveTabId` parameter. Update the `ActiveTabId` parameter value manually in the `ActiveTabIdChanged` handler.

> caption Using the TabStrip ActiveTabIdChanged event

<demo metaUrl="client/tabstrip/events/example-7/" height="420"></demo>

## OnStateChanged

The `OnStateChanged` event fires whenever the user interacts with the TabStrip and changes the active tab, visible tabs, pinned tabs, or tab order.

The event handler receives a [`TabStripStateEventArgs`](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.tabstripstateeventargs) argument with a `TabStripState` property. Read more details in the [State Management](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/state) article.

> caption Using the TabStrip OnStateChanged event

<demo metaUrl="client/tabstrip/events/example-6/" height="420"></demo>

## OnStateInit

The `OnStateInit` event fires once when the TabStrip initializes. Unlike other Telerik Blazor components where `OnStateInit` fires early in the component lifecycle, the TabStrip fires it during `OnAfterRenderAsync` on the first render. This later timing is required by the component to detect which tabs are overflowing before the initial state is reported.

Use this event to inspect, customize, or restore the initial state of the TabStrip, for example, from a persistent storage.

When setting the active tab through the TabStrip state, also set the `ActiveTabId` parameter.

The event handler receives a [`TabStripStateEventArgs`](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.tabstripstateeventargs) argument with a `TabStripState` property. Read more details in the [State Management](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/state) article.

> caption Using the TabStrip OnStateInit event

<demo metaUrl="client/tabstrip/events/example-5/" height="420"></demo>

## OnTabDrop

The `OnTabDrop` event fires when the user completes a tab reorder and releases the dragged tab. Unlike the [`OnTabReorder`](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/events#ontabreorder) event, `OnTabDrop` always fires once per reorder operation.

The `OnTabDrop` event handler receives a [`TabStripTabDropEventArgs`](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.tabstriptabdropeventargs) argument.

To [enable tab reordering](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/tab-reorder), set the TabStrip `EnableTabReorder` parameter to `true`.

> caption Using the TabStrip OnTabDrop event

<demo metaUrl="client/tabstrip/events/example-4/" height="420"></demo>

## OnTabReorder

The `OnTabReorder` event fires when a tab changes its order index during user dragging. The event can fire multiple times during a single user reorder operation. Compare with [`OnTabDrop`](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/events#ontabdrop), which fires only once per reorder operation.

The `OnTabReorder` event handler receives a [`TabStripTabReorderEventArgs`](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.tabstriptabreordereventargs) argument.

To [enable tab reordering](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/tab-reorder), set the TabStrip `EnableTabReorder` parameter to `true`.

Tab reordering also triggers the [`OnStateChanged` event](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/events#onstatechanged), which fires before `OnTabReorder`.

> caption Using the TabStrip OnTabReorder event

<demo metaUrl="client/tabstrip/events/example-3/" height="420"></demo>

## PinnedChanged

The Tab `PinnedChanged` event fires when the user [pins or unpins a tab](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/tab-reorder). The event handler receives a boolean value with the new tab pinned state.

Update the `Pinned` parameter value in the `PinnedChanged` handler.

> caption Using the TabStripTab PinnedChanged event

<demo metaUrl="client/tabstrip/events/example-2/" height="420"></demo>

## VisibleChanged

The Tab `VisibleChanged` event fires when the user [closes a tab](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/tabs-collection#hiding-and-showing-tabs). The event handler receives a boolean value with the new tab visibility.

Update the `Visible` parameter value in the `VisibleChanged` handler. You can also [display a confirmation prompt](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/tabs-collection#hiding-and-showing-tabs) before hiding a tab or [reuse a single handler for multiple tabs](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/tabs-collection#example).

> caption Using the TabStripTab VisibleChanged event

<demo metaUrl="client/tabstrip/events/example-1/" height="420"></demo>

## See Also

* [TabStrip Overview](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/overview)
* [Dynamic Tabs](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/tabs-collection)
* [Tab Reordering](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/tab-reorder)
* [State Management](https://www.telerik.com/blazor-ui/documentation/components/tabstrip/state)
