# Drag and Drop to Reorder TabStrip Tabs

## Environment

<table>
    <tbody>
        <tr>
            <td>Product Version</td>
            <td>14.4.0</td>
        </tr>
        <tr>
            <td>Product</td>
            <td>Progress® KendoReact TabStrip</td>
        </tr>
    </tbody>
</table>

## Description

The KendoReact TabStrip does not support drag-and-drop reordering of tabs out of the box. I want to allow end users to rearrange tabs by dragging them.

## Solution

Render a custom element inside the `title` prop of each `TabStripTab` and attach drag-and-drop behavior to it using the [`useDraggable`](https://www.telerik.com/kendo-react-ui/components/common/api/usedraggable) and [`useDroppable`](https://www.telerik.com/kendo-react-ui/components/common/api/usedroppable) hooks from `@progress/kendo-react-common`. When a drop occurs, update the array of tabs in state and recalculate which index is selected so the active tab stays the same after the reorder.

The example below demonstrates the complete approach:

[Demo Source](https://demos.telerik.com/kendo-react-ui/knowledge-base/layout/tabstrip-drag-drop-reorder-tabs/source.txt)

## See Also

* [TabStrip Documentation](https://www.telerik.com/kendo-react-ui/components/layout/tabstrip)
* [TabStrip API](https://www.telerik.com/kendo-react-ui/components/layout/api/tabstripprops)
* [Drag and Drop Overview](https://www.telerik.com/kendo-react-ui/components/common/drag-and-drop)
* [`useDraggable` Hook API](https://www.telerik.com/kendo-react-ui/components/common/api/usedraggable)
* [`useDroppable` Hook API](https://www.telerik.com/kendo-react-ui/components/common/api/usedroppable)
