Tabs builds on Radix Themes Tabs with pathname-based active detection. Pass currentPath, navigate, and matchPath from React Router (or equivalents) so tabs behave as real links—middle-click and “open in new tab” keep working. TabsTrigger accepts to or href, optional extraRouteMatchers, counter, leadIcon, and iconTitle.
Tabs
Storybook
TabsTrigger
Name
Type
Default
Description
to / href
string
—
Destination path.
extraRouteMatchers
array
—
Extra paths that mark tab active.
counter
number | string
—
Badge when > 0.
leadIcon
Icon
—
Icon before label.
onClick
MouseEventHandler
—
Runs before default navigation.
Default (interactive)
Second tab active
Many tabs
Long tab names
With counters
Extra route matchers
Small
Sliding animation
Static paths (no state)
The preview fixes currentPath and uses a no-op navigate so the active tab is visible without leaving the page.