Skip to main content

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 bar
Live demo
Open ↗

When 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​

PropTypeRequiredDescription
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).
linkComponentLinkComponent—Overrides LinkProvider's link component for href items.
brandReact.ReactNode—Brand lockup node (logo + wordmark).
groupsSideNavGroup[] | SideNavItem[]YesGroups of links, or a flat array of items (treated as one group).
footerReact.ReactNode—Footer slot, e.g. a user chip.
collapsibleboolean—Show a collapse-to-rail toggle.
isCollapsedboolean—
defaultCollapsedboolean—
onCollapsedChange(collapsed: boolean) =&gt; void—
classNamestring—