Skip to content

NavItem

<ts-nav-item> vv0.6.3

The ts-nav-item component.

Open in Storybook for interactive demos.

<ts-nav-item>Content</ts-nav-item>
PropertyAttributeTypeDefaultDescription
activeactivebooleanfalseWhether this item is currently active.
badgebadgestring | undefinedBadge text or count to display after the label.
disableddisabledbooleanfalseWhether this item is disabled.
expandableexpandablebooleanfalseWhether this item contains expandable nested items.
expandedexpandedbooleanfalseWhether the nested items are currently visible.
hrefhrefstring | undefinedThe URL to navigate to.
iconiconstring | undefinedLucide icon name to display.
EventDetailBubblesComposedDescription
tsSelectvoidYesYesEmitted when the nav item is selected.
NameDescription
*(default)*Default slot for label text.
childrenSlot for nested nav items when expandable.

Use ::part() to style internal elements:

PartDescription
badgeThe badge element.
chevronThe expand/collapse chevron indicator.
childrenThe nested children wrapper.
iconThe icon wrapper.
itemThe list item wrapper.
labelThe label wrapper.
linkThe anchor or button element.
ts-nav-item::part(badge) {
/* your custom styles */
}
<ts-nav-item>Content</ts-nav-item>
import { TsNavItem } from '@tessera-ui/react';
<TsNavItem>Content</TsNavItem>