App sidebars
Workspace navigation that folds to a rail, and a docs sidebar.
Workspace sidebar
API and filesSidebar rail
API and filesNorthwind
Home
3 projects due this week. API v3 ships on 4 November.
Docs sidebar
API and filesData grid
Overview
What the component is for, when to reach for it, and which part to use instead when it is not the right fit. Every example on this page can be copied and edited in your own source.
Install
Components are added to your project as source, so you own the code and can change anything. Pick the package manager you already use.
With npm
Run the add command through npx with the component name. The files land under components/ui along with any parts it builds on.
With pnpm
Run the same command through pnpm dlx. Nothing is installed globally and the lockfile is left as it was.
Use it
Import it from your components folder and pass your data. Loading, empty and error states are built in, and the keyboard works without extra setup.
Props
Every prop is typed, and the ones you will use most come first. Callbacks receive the changed value, so you can keep state wherever you like.
When to use
- Workspace sidebar: the main navigation of an application.
- Sidebar rail: space-constrained navigation.
- Docs sidebar: documentation sites.
When not to use
- A public website.
- Labels matter.
- Application navigation.