Navigation · ui · 22K

Sidebar

shadcn's sidebar system as a source list: a white panel with a 1px divider, rows of 16px icons and names, the selected row inverted. Folds to an icon rail with balloon tooltips, becomes a sheet on small screens, ⌘B toggles it.

The panel is fixed to the viewport, as in shadcn. To place it inside a box, give SidebarProvider a height and pass className="absolute h-full" to Sidebar.

Install

pnpm dlx shadcn@latest add @s7ui/sidebar

Example

This example also uses @s7ui/icons.

Documents
Press ⌘B or the button to fold the sidebar to icons.

Info

Files:
components/ui/sidebar.tsx, hooks/use-is-mobile.ts
Uses:
@s7ui/theme, @s7ui/bitmap, @s7ui/button, @s7ui/input, @s7ui/separator, @s7ui/sheet, @s7ui/tooltip
Packages:
radix-ui, class-variance-authority