Skip to content
TrademarkTrademark
Docs
Components

PageTabs

Updated: November 30, 2026
View on GitHub

PageTabs is a row of tabs where each tab is its own page: a route (/projects/42/payments) or a search param (?tab=payments). The selection lives in the URL, so it survives a reload and can be shared. Use Tabs for panels that switch in place on one page.

The clicked tab is selected at once, before the server has rendered the next page, and the row is aria-busy until value (read from the URL) moves to it. A navigation that ends without moving value gives the selection back. A row wider than its box scrolls sideways on a phone instead of wrapping.

Without onSelect, each tab is a plain link through the app's Link adapter, and the clicked tab still shows as selected until value changes. onSelect with event.preventDefault() lets you navigate in a transition and pass its isPending as pending. Cmd-click and middle-click still open the page in a new tab.

Matching the current page

A tab is selected when value equals its value, or its href when it has none. Read value from the URL: usePathname() for routes, a search param for ?tab= views. Give a tab a value when its href carries more than the match needs, such as a query string.

Segmented look

look="segmented" draws the same links inside a bordered rail, for a page's views in a toolbar.

Accessibility

The row is a nav named by aria-label. The current tab carries aria-current="page", and the row reports aria-busy while the next page renders. A badge is read with its tab's label.

API reference

Type
Default
aria-labelrequired
What the row navigates, for a screen reader: "Project views", "Finances".
string—
tabsrequired
Each tab's href, label, and optionally value, prefixIcon, badge and disabled.
readonly PageTab[]—
value
The current page's tab: its value or href, read from the URL.
string—
onSelect
Runs on a click before the link follows. Call event.preventDefault() to navigate yourself.
(tab: PageTab, event: React.MouseEvent<HTMLElement>) => void—
pending
The next page is rendering: pass a transition's isPending.
booleanfalse
look
tabs (default): ghost buttons. segmented: inside a bordered rail.
tabssegmented
tabs
size
The buttons' size. Defaults to the theme's density.
sml
—
…and every FlexProps propinherited—
Edit this page on GitHub