Skip to content
nexubDesign System
v11.9.0

Components · Navigation

Sidebar

StableAdded v0.0.1

Vertical app navigation: a header, grouped items with icons, and a pinned footer. Collapses to icons.

import { Sidebar } from '@nexub/react';
View as Markdown

Playground

Props

TSX
<Sidebar.Root aria-label="Workspace" className="rounded-shape-container">…</Sidebar.Root>

Examples

Default

Collapsed

Props

Props
PropTypeDefaultDescription
collapsedboolean—Icon-only width. Labels stay for screen readers and show as a native tooltip.
aria-labelstring—Name of the nav landmark. Defaults to the localised "Sidebar".
SidebarHeader statusReact.ReactNode—Trailing element next to the logo (Sidebar.Header children), e.g. a Badge. Moves under the logo when they don’t fit.
SidebarGroup labelstring—Heading above a group of items.
SidebarItem iconReact.ReactNode—Leading icon; the only thing shown when collapsed.
SidebarItem activeboolean—Marks the current page (aria-current="page").
SidebarItem asChildboolean—Use your router <Link> as the item; pass it as the only child.
Sidebar.Separator / Footercompound—A divider, and a footer that stays pinned while the items scroll.
accent'leap' | 'bookub' | 'payub' | 'founderub' | 'people' | 'contracts' | 'forms' | 'commerce' | 'money' | 'capital' | 'mind' | 'go' | 'command-hub' | 'runner' | 'book-hub' | 'payhub' | 'founder-hub' | 'os' | 'fintech' | 'intelligence' | 'autonomous'—10.3: the app or division this sidebar belongs to. Sets data-product / data-division, so the active item takes that accent (needs @nexub/themes/products or /divisions).
collapseBelow'sm' | 'md' | 'lg'—10.6: collapse to the icon rail below this breakpoint (when collapsed is not passed).

On iOS & Android