Skip to content

Sidebar

<ts-sidebar> vv0.6.3

The ts-sidebar component.

Open in Storybook for interactive demos.

<ts-sidebar width="260px">Content</ts-sidebar>
PropertyAttributeTypeDefaultDescription
collapsedcollapsedbooleanfalseWhether the sidebar is collapsed.
collapsiblecollapsiblebooleanfalseWhether the sidebar can be collapsed via a toggle button.
widthwidthstring'260px'The expanded width of the sidebar.
EventDetailBubblesComposedDescription
tsToggle\{ collapsed: boolean; \}YesYesEmitted when the sidebar collapsed state changes.
NameDescription
*(default)*Default slot for navigation content (scrollable).
footerContent displayed at the bottom of the sidebar (sticky).
headerContent displayed at the top of the sidebar (sticky).

Use ::part() to style internal elements:

PartDescription
containerThe main sidebar container.
contentThe scrollable content area.
footerThe footer slot wrapper.
headerThe header slot wrapper.
toggleThe collapse toggle button.
ts-sidebar::part(container) {
/* your custom styles */
}
<ts-sidebar width="260px">Content</ts-sidebar>
import { TsSidebar } from '@tessera-ui/react';
<TsSidebar width="260px">Content</TsSidebar>