Application shell
Navigate a responsive workspace with a sidebar, header, and content region.
Installation
Complete one-time setup, then install:
pnpm dlx shadcn@4.18.0 add @siteplane/application-shellFiles
The command installs src/components/application-shell.tsx and its component dependencies. Render its default export in your application. The registry item and the Code panel contain the same source.
Try the workflow
Choose Overview, Projects, or Settings to change the page in the header and the content area; Settings contains a notification switch. The header button hides and shows the sidebar on desktop and opens it as a sheet at narrow widths.
Composition and adaptation
DashboardShell owns the application layout and SidebarProvider; Sidebar parts render the navigation, and Card and SettingsList provide the page content.
| Area | Details |
|---|---|
| Data | active selects the page; pages holds its content; notifications holds the switch value. |
| Callbacks | Navigation clicks update active; Switch onCheckedChange updates notifications. |
| Included states | Active navigation (aria-current), expanded and hidden desktop sidebar, mobile sheet and a settings page. |
| Connect to your product | Replace active with your router and the page content with your routes. For a viewport-sized app, remove the bounded wrapper and the h-full and min-h-0 classes on DashboardShell and its sidebar; the top bar then stays in view while the content scrolls, and stickyHeader={false} lets the whole page scroll instead. Read the cookie and keyboard shortcut notes on Sidebar. No authentication or backend data is included. |