
- Location:
sabo/src/components/ui/sidebar.tsx
When to use
- Persistent app navigation with groups, nested items, and badges.
- Collapsible behaviors for desktop (offcanvas or icon) and mobile sheet.
Usage
sabo/src/components/ui/sidebar.tsx
Key props
boolean
default:"true"
Initial expanded state on desktop.
string
default:"left"
left | rightstring
default:"sidebar"
sidebar | floating | insetstring
default:"offcanvas"
offcanvas | icon | noneStyling tip
- Use
SidebarMenuButtonvariants and sizes for density control; badges/actions are optional. - Place page content inside
SidebarInsetto respect inset/floating variants.
Accessibility
- Mobile uses a Sheet with focus trap; desktop supports keyboard toggle via Cmd/Ctrl+B.