Skip to content
Eskais UI

Navigation

Tabs

UI SDK Tabs: arrow-key navigation, automatic or manual activation, controller support, a selected state that reads at 3:1, and a list that scrolls when its tabs don't fit, with edge fades and pointer-only scroll buttons.

Example

Columns of tasks by status.

Installation

npx shadcn@latest add @eskais/tabs
Brings alongnarrowbutton
npm packageslucide-react

Usage

Import
import { readEdges, revealTab, TabsScroll, tabsScrollLabels } from "@/components/ui/tabs-scroll"import {  createTabsController,  Tabs,  TabsIndicator,  TabsList,  TabsPanel,  TabsTab,  TabsTabIcon,} from "@/components/ui/tabs"

API reference

TabsScroll

PropTypeDefault
labelsPartial<TabsScrollLabels>–
childrenrequired(ref: RefObject<HTMLDivElement | null>) => ReactNode–

Tabs

Takes TabsProps<T>.

TabsList

PropTypeDefault
scrollable`"auto"` (default) lets a horizontal list scroll when its tabs don't fit, with edge fades and, on fine pointers, scroll buttons; the selected or focused tab scrolls into view clear of the fades. `false` keeps it a plain list that never scrolls."auto" | false"auto"
scrollLabelsPartial<TabsScrollLabels>–

Also takes every prop of UI SDK TabsList.

Other exports

readEdgesrevealTabtabsScrollLabelscreateTabsControllerTabsIndicatorTabsTabIcontype TabsScrollLabelstype TabsListPropstype TabsProps

Accessibility

  • Arrow keys move between tabs, automatic or manual activation; panels are labelled by their tab.
  • activateOnPress (off by default) selects a tab on a mouse or pen press instead of on release, like Linear and macOS. Touch stays on release, so scrolling a tab bar doesn't select. WCAG 2.5.2 allows it because another press undoes it; actions and menus always activate on release.

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.