Skip to content

Tabs

<ts-tabs> vv0.4.0

The ts-tabs component.

Open in Storybook for interactive demos.

<ts-tabs size="md" variant="line">Content</ts-tabs>
PropertyAttributeTypeDefaultDescription
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.
NameDescription
*(default)*Default slot for ts-tab-panel children.

Use ::part() to style internal elements:

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