AppShell
layoutsThe application frame: sticky header, sidebar, main and footer, with a resizable desktop sidebar, a tablet icon rail and a mobile drawer.
Ops console
resizableSidebar: drag the sidebar edge under 8rem and the nav becomes an icon rail. Under 48rem of viewport the sidebar is a drawer behind the hamburger.
Northwind Ops
stagingServices
api-gateway
23 % CPU
worker-02
87 % CPU
cache-01
4 % CPU
postgres-primary
38 % CPU
media-transcode
64 % CPU
search-index
55 % CPU
Full-height sidebar
layout="sidebar-full" runs the sidebar the whole height with the brand at its top; the header only spans the content column. sidebarPadding="sm".
Icon rail and drawer state
sidebarWidth="4.5rem" keeps the desktop sidebar a rail (tablets get one automatically); bind:open exposes the phone drawer, which closes on Escape, the scrim or a link tap.
Support desk
Drawer open: false Rail labels stay in the accessible name and show as tooltips.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
header | Snippet | — | |
sidebar | Snippet | — | |
footer | Snippet | — | |
children required | Snippet | — | |
sidebarWidth | string | '16rem' | Initial / non-resizable desktop sidebar width (any CSS length). |
navLabel | string | 'Main navigation' | |
resizableSidebar | boolean | false | Drag the sidebar's right edge on desktop to resize it. Below ~8rem the nav collapses to an icon rail automatically (see NavItem, driven by the `sidebar` container query — no JS state needed). |
minSidebar | number | 64 | |
maxSidebar | number | 360 | |
sidebarWidthKey | string | — | localStorage key to persist the resized width. |
layout | 'header-top' | 'sidebar-full' | 'header-top' | `'sidebar-full'`: the sidebar spans the whole height on desktop/tablet and the header only covers the content column (brand sits top-left). |
stickySidebar | boolean | false | Pin the desktop sidebar to the viewport (own scroll) so its footer stays visible on long pages. Sits below the header in `header-top`, spans the full viewport height in `sidebar-full`. |
sidebarPadding | 'none' | 'sm' | 'md' | 'md' | Inner padding of the sidebar; `'none'` when the nav owns its gutters. |
open bindable | boolean | false | Mobile drawer state; reset to `false` when the viewport reaches 48rem. |
onOpenChange | (open: boolean) => void | — | Fires when AppShell itself opens or closes the drawer. |
closeOnNavigate | boolean | true | Close the mobile drawer when a same-origin link inside it is clicked (plain left click, no modifier keys, no `target` / `download`). |
class | string | '' | |
style | string | '' |