Examples
Default
Hug (sizes to content — does not stretch)
With Disabled Tab
Scrollable - Narrow Container
All States (Matrix)
Props
Tabs
TabsContent
Renders the content panel for a given tabvalue. Only visible when its value matches the active tab.
TabsList
Container forTabsTrigger elements. Renders a sliding active-tab indicator that animates between tabs.
Controls tab alignment within a full-width container.
false(default): tabs spread evenlytrue: tabs left-aligned, sized to content"md"(breakpoint): spread on mobile, left-aligned at breakpoint and up
"underline" marks the active tab with a line under the row. "pill" sits the tabs in a rounded track, sized to its tabs, and slides a filled pill behind the active one. A pill list is horizontal and ignores fullWidth, alignLeft, variant and flushLeft; it scrolls when it doesn’t fit.Drops the leading padding on the first tab so its label sits flush with the list’s left edge, lining it up with page content above or below the bar (a heading, for instance) rather than being indented by the tab’s own padding. Spacing between tabs is unaffected. Pair with
alignLeft or variant="hug".Pill only: the pill follows the mouse across the tabs and settles back on the selected one when the pointer leaves. Mouse only, and off when the user prefers reduced motion.
When
true (the default), the tab list spans the full width of its container and each tab grows equally. Set to false for inline sizing.Scrolls the row horizontally when the tabs don’t fit, instead of letting them compress. By default a tab may shrink until its label ellipsises, which on a narrow viewport can truncate every label at once; here each tab keeps its natural width and the overflow scrolls. The scrollbar itself is hidden — the clipped tab at the edge is the affordance.Because the tabs are content-sized, they no longer spread to fill the row: a set that does fit sits left-aligned, as with
alignLeft.Horizontal orientation only: a vertical list already grows downwards.Explicit layout variant.
"hug" sizes the list to its content; "fill" stretches it full-width with equal-width tabs. Takes precedence over fullWidth/alignLeft.TabsListSkeleton
Loading placeholder for a pillTabsList. Renders the same track, so the row does not jump when the real tabs replace it. Pass placeholder items (for example Skeleton pills) as children.
The track is hidden from assistive technology; announce the loading state on the surrounding region with aria-busy.
Takes no props of its own. Accepts all standard div attributes, including className.
TabsOverflow
The last tab in aTabsList, opening a menu of the tabs that don’t fit the row. It sits in the row’s arrow-key order, opens with click, Enter, Space or ArrowDown, and never selects anything itself. While one of its items is active it shows that item’s label and is the selected tab.
Reads and sets the value of the surrounding Tabs, controlled or not. Renders nothing when it has no items.
TabsOverflowItem
A tab listed in aTabsOverflow menu. The active one takes the menu’s selected style and is announced as the checked option.
Leading avatar rendered in place of
DropdownMenuItemProps.leadingIcon, for rows that represent a person or account. Pass an Avatar sized to 24. Takes precedence over leadingIcon.Trailing count or number (e.g. an unread total) rendered before
DropdownMenuItemProps.trailingIcon.Optional secondary text rendered on a second line below the label. When provided, the row switches to a two-line layout and the leading/trailing icons align to the title line (top) rather than the row’s vertical centre.
Icon (or other node) rendered before the label. Ignored when
DropdownMenuItemProps.avatar is set. Icons sit in a 16px box in Icons/Secondary, and prop-based icons draw filled at 16px unless they set filled or size themselves (filled={false} opts out). Legacy icons such as TrashBinIcon stay outlined.A small action drawn at the row’s end, after everything else — typically a 24px
Button rendered asChild as a span. The whole row performs the action through onSelect, so pass a visual, never a second interactive control. Its text joins the row’s accessible name, so the label people see is also the one they can speak. The row does not restyle it: when the row is disabled, disable the visual too (or show its loading state) so it does not look live.Icon (or other node) rendered after the label. Treated like
DropdownMenuItemProps.leadingIcon.TabsTrigger
An interactive tab that activates its associatedTabsContent panel.
Renders a <button> by default. Pass asChild to render the tab as another element — e.g. a router link for navigation tabs (<TabsTrigger asChild><Link href="…">…</Link></TabsTrigger>). With asChild the child element becomes the tab itself (receiving role="tab" and focus management), so the tab stays a single interactive control rather than nesting one inside the other.
Inside a TabsList appearance="pill" the tab takes the pill styling.
Exported types
Also exported from@fanvue/ui: TabsContentProps, TabsListAppearance, TabsListPillSize, TabsListProps, TabsListSkeletonProps, TabsOverflowItemProps, TabsOverflowProps, TabsProps, TabsTriggerProps.
Setup: Installation · Theming