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.
tabs-demo.tsxCopy code
Installation
Copy code
Usage
ImportCopy code
API reference
TabsScroll
| Prop | Type | Default |
|---|---|---|
labels | Partial<TabsScrollLabels> | – |
childrenrequired | (ref: RefObject<HTMLDivElement | null>) => ReactNode | – |
Tabs
Takes TabsProps<T>.
TabsList
| Prop | Type | Default |
|---|---|---|
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" |
scrollLabels | Partial<TabsScrollLabels> | – |
Also takes every prop of UI SDK TabsList.
TabsTab
Takes every prop of UI SDK TabsTab.
TabsPanel
Other exports
readEdgesrevealTabtabsScrollLabelscreateTabsControllerTabsIndicatorTabsTabIcontype TabsScrollLabelstype TabsListPropstype TabsPropsAccessibility
- 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.