Sidebar
Build a collapsible sidebar that opens as an overlay panel on mobile.
Basic usage
Give the root a height and place one Panel followed by Main. On desktop, resizable enables resizing. Below 48 rem, use the toggle to open the panel.
API
Key props and defaults.
| Prop | Values and behavior | Default |
|---|---|---|
Root.resizable | boolean | false |
Root.defaultWidth / minWidth / maxWidth | number (px) | 256 / 216 / 360 |
Root.compactWidth | number (px) | 64 |
Root.collapsed / onCollapsedChange | boolean / (collapsed) => void | — |
Root.mobileOpen / onMobileOpenChange | boolean / (open) => void | — |