Skip to content

Tabs

<ts-tabs> vv0.6.3

The ts-tabs component.

Open in Storybook for interactive demos.

<ts-tabs orientation="horizontal" size="md" variant="line">Content</ts-tabs>
PropertyAttributeTypeDefaultDescription
closableclosablebooleanfalseWhether tabs display a close button.
orientationorientation"horizontal" | "vertical"'horizontal'The orientation of the tab bar.
scrollablescrollablebooleanfalseWhether the tab list is scrollable on overflow.
sizesize"lg" | "md" | "sm"'md'The size of the tab buttons.
valuevaluestring | undefinedThe value of the currently active tab.
variantvariant"enclosed" | "line" | "pill"'line'Visual variant of the tab bar.
EventDetailBubblesComposedDescription
tsChange\{ value: string; \}YesYesEmitted when the active tab changes.
tsClose\{ value: string; \}YesYesEmitted when a tab’s close button is clicked.
NameDescription
*(default)*Default slot for ts-tab-panel children.

Use ::part() to style internal elements:

PartDescription
closeThe close button inside closable tabs.
panelsThe panel container.
tabEach individual tab button.
tab-activeThe currently active tab button.
tablistThe tab button container.
ts-tabs::part(close) {
/* your custom styles */
}
<ts-tabs orientation="horizontal" size="md" variant="line">Content</ts-tabs>
import { TsTabs } from '@tessera-ui/react';
<TsTabs orientation="horizontal" size="md">Content</TsTabs>