Sidebar
An app-shell sidebar that collapses offcanvas or to icons and becomes a sheet on small screens.
When to use
- Use when
- The main navigation of an app, collapsible on desktop and a sheet on mobile.
- Avoid when
- A site with a few top-level pages; use Navigation Menu.
Installation
The source lands in src/components/ui/sidebar.tsx, along with any Shelf items it builds on, and .shelf/lock.json records what was installed. It's yours to edit.
Usage
Built on
- Packages
@base-ui/react,@stylexjs/stylex- Accessibility
- Focus, keyboard, and ARIA behavior come from Base UI.
- Figma
- Optional native Figma library. See Designers.