App shell
The frame an app lives in: a sidebar that rests on a rail, breadcrumbs that switch projects, notifications, an account menu with the theme, and a command palette on Cmd+K.
Try ⌘K and jump to Beacon, switch projects from the breadcrumb, open the project's details with ⌘I, collapse the sidebar with ⌘B and rest the pointer on the rail, then read your notifications.
Installation
npx shadcn@latest add @quireui/app-shellIt installs components/app-shell/app-shell.tsx with its example content beside it in data.ts, and every component it is built from.
Using it
Render it as the layout around your pages and replace the parts that are about Northwind: the routes in pages, the projects and the people in data.ts. The links set state so the example works on its own; give each SidebarItem and breadcrumb a render with your router's link instead.
Everything beyond the sidebar is there to show what is possible, and comes out cleanly: delete SidebarPanel and its trigger for the details panel, Notifications for the bell, and Palette with the search buttons that open it for the command palette. Nothing else depends on them.
The page scrolls inside the shell, so the top bar and the sidebar stay where they are. To let the window scroll instead, drop h-dvh from the provider and overflow-y-auto from SidebarInset.
The theme options set the dark class the tokens read. If your app already handles the theme, call it from changeTheme.
Built from
- Sidebar: the rail, peek, saved state, the sheet on phones and the details panel on the right
- Command: the palette on ⌘K
- Breadcrumb: the path, with a switcher for the project
- Dropdown menu: the workspace switcher and the account menu with its theme choice
- Popover: notifications
- Table, Progress, Badge, Avatar, Kbd and Button: the example pages
Keys
| Key | Action |
|---|---|
| ⌘K / Ctrl+K | Open the command palette |
| ⌘B / Ctrl+B | Collapse or expand the sidebar |
| ⌘I / Ctrl+I | Open or close the project's details |
| Esc | Close the palette, a menu or a peek |