SideNav
A persistent vertical app-shell navigation rail with grouped links. @startingPoint section="Layout" subtitle="Persistent app sidebar with grouped links & collapse" viewport="280x600"
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
A persistent vertical app-shell navigation rail with grouped links.
Accessibility
Landmark structure (header/nav/footer) with skip-to-content support. Collapsible navigation keeps an accessible name when collapsed.
Install and import
npx shadcn@latest add @prism/side-nav
import { SideNav } from '@/components/prism/SideNav';
In a no-build prototype, read it from the bundle instead: const { SideNav } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
variant | "shell" | "section" | — | "shell" (default): the full-height app rail. "section": no shell styling, for a section nav inside a page. |
collapseBelow | "desktop" | "tablet" | — | Collapse to a disclosure button below this size tier: "desktop" (< 1024px) or "tablet" (< 640px). |
linkComponent | LinkComponent | — | Overrides LinkProvider's link component for href items. |
brand | React.ReactNode | — | Brand lockup node (logo + wordmark). |
groups | SideNavGroup[] | SideNavItem[] | Yes | Groups of links, or a flat array of items (treated as one group). |
footer | React.ReactNode | — | Footer slot, e.g. a user chip. |
collapsible | boolean | — | Show a collapse-to-rail toggle. |
isCollapsed | boolean | — | |
defaultCollapsed | boolean | — | |
onCollapsedChange | (collapsed: boolean) => void | — | |
className | string | — |