interface TabBarProps

The props of TabBar.

Type Parameters

T extends string

Properties

The tabs, in order.

The active tab's key.

onChange: (key: T) => void

Called with the key of the tab chosen.

optional
className: string

An extra class for the scroller.

optional
innerClassName: string

An extra class for the row.

optional
leading: ReactNode

Optional content rendered before the tabs (e.g. a scope selector). Sits in the same line, aligned with them, and stays where it is while they scroll: it is outside the row that scrolls, which clips them at its edge.

Usage

import { type TabBarProps } from "src/components/shared/TabBar.tsx";