@objectifthunes/whiteboard
NAVIGATION

Tabs

Real tabs that switch a body, with the ARIA wiring and arrow keys. Underline for pages, enclosed for cards.


PREVIEW
Plan
Team
Seats
8 of 10
Renews
1 September 2026
Enclosed, filling the row

42,180 API calls this month.

SOURCE
import { Tabs } from '@objectifthunes/whiteboard'

<Tabs
  value={tab}
  onChange={setTab}
  items={[
    { id: 'overview', label: 'Overview', icon: <Activity size={13} />, content: <Overview /> },
    { id: 'invoices', label: 'Invoices', badge: 3, content: <Invoices /> },
    { id: 'audit', label: 'Audit log', disabled: true, content: null },
  ]}
/>

{/* strip only — omit content on every item and lay the body out yourself */}
<Tabs variant="enclosed" fill value={tab} onChange={setTab} items={items} />
NOTES

Give items a content and Tabs renders the panel with the full role="tab", aria-controls and aria-labelledby wiring. Omit it on every item and you get the strip alone.

Arrow keys move and select together, per the ARIA tabs pattern, and only the selected tab is tabbable — so Tab moves past the strip into the panel rather than through every tab.

Two variants. underline is the page-level strip; enclosed is a segmented control for tabs inside a card. fill stretches tabs to share the row.

This is not FilterTabs. If switching changes what the page is showing you, use Tabs. If it changes how much of one list you see, use FilterTabs — that reads as a control, and this reads as navigation.