Primary usage
Two labelled groups, icons, a count badge and an active item.
Grouped, active-aware navigation for the app-shell sidebar.
bunx shadcn@latest add @nx-ui/sidebar-navTwo labelled groups, icons, a count badge and an active item.
Badges accept a plain number/string or any ReactNode, such as a status Badge.
An item with `items` becomes a collapsible group; it opens by default when it or a child is active.
A realistic Nexus ReGen navigation tree: operational groups, a collapsible sites sub-menu and an organisation group.
When the nav outgrows its container, wrap it in the ScrollFade block: token-gradient fades appear at whichever edge still has content beyond it, and the optional indicator pill adds an explicit “there’s more down here” affordance — click it to scroll a viewport, and it fades away at the bottom (instantly under reduced motion). Left: fades only. Right: fades plus the labelled indicator pill (indicatorLabel also takes a count hint, e.g. “4 more”). Inside the app shell, wire it as <AppSidebar><ScrollFade indicator><SidebarNav …/></ScrollFade></AppSidebar> — the showcase’s own sidebar is composed exactly this way. Match fadeFrom to the surface behind the list (here from-sidebar).
Exported parts and their props, extracted from the component source.
| Prop | Type | Default | Description |
|---|---|---|---|
groups* | SidebarNavGroup[] | — | — |