Components
Sidebar Nav
A vertical navigation sidebar with collapsible groups, search, and active state indication. Perfect for dashboards and admin panels.
Basic usage
Compose with SidebarNavSearch, SidebarNavContent, SidebarNavGroup, and SidebarNavItem.
Collapsible groups
Groups are collapsible by default. Click the header to toggle. Use collapsible={false} to disable.
With badges
Add notification counts or status indicators with the badge prop.
SidebarNav Props
| Prop | Type | Default | Description |
|---|---|---|---|
activePath | string | — | Currently active route path. |
onNavigate | (path: string) => void | — | Callback when a nav item is clicked. |
SidebarNavGroup Props
| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired | string | — | Section heading text. |
collapsible | boolean | true | Whether the group can be collapsed. |
defaultOpen | boolean | true | Initial expanded state. |
SidebarNavItem Props
| Prop | Type | Default | Description |
|---|---|---|---|
hrefrequired | string | — | Route path for this item. |
icon | React.ReactNode | — | Icon rendered to the left. |
badge | React.ReactNode | — | Badge or count rendered to the right. |
Accessibility
- Uses semantic
<nav>witharia-label. - Collapsible groups use
aria-expanded. - Active item has
aria-current="page". - Search input has accessible label.