Layout
AppShell
Frame of a product screen: navigation (240px), fluid main content without a width limit and an optional inspector (320px). The docs site runs on it.
- Experimental
- No keyboard interaction
- Screen reader not tested yet
Playground
Workspace
Overview
<AppShell
navLabel="Workspace: index"
nav={<SideNav
label="Workspace"
current="/workspace"
groups={[
{
label: "Workspace",
items: [
{ label: "Overview", href: "/workspace" },
{ label: "Requests", href: "/workspace/requests" },
],
},
]}
/>}
>
<PageHead as="h2" size="md" eyebrow="Workspace" title="Overview" />
</AppShell>Usage
When to use
Use AppShell as the frame of a product screen: an application people work in, with a navigation between its areas. The docs site you are reading runs on it.
When not to use
- For portfolio, showcase and marketing pages: they are editorial and use Section and Container.
- For a single form or a single page without areas to move between: PageHead and Sections are enough.
How it works
From lg the navigation sits on the left at 240px, the main region takes the rest without a width limit. An inspector on the right (320px) is optional and appears from xl; below that it follows the content. The navigation and inspector stick below the header while the content scrolls. Below lg the navigation comes first and a SideNav inside it turns into a drawer. The optional header bar uses the ink surface. AppShell renders the page's only <main id="main">.
Content guidelines
Name every region by what it holds, for example "Projects: index" or "Selected request". Keep the inspector to details of the current selection; anything people need to finish their task belongs in the main region.
Do and don’t
- Use AppShell for every product screen with more than one area to move between.
- Start the main region with PageHead size="md"; put each region (toolbar, content) in its own element, the shell spaces them.
- Give every region a label that names what is in it.
- Not for portfolio or marketing pages; they use Section and Container.
- Don't put a Container around the main content of a product screen; it is meant to use the full width.
- No terracotta areas inside a product screen.
Anatomy
- containerHeader on top, then navigation, main and inspector side by side from lg (inspector from xl).
- groupNavigation region in the sunken side-nav tone with a hairline on the right; sticky below the header.
- bodyMain region: fluid width, page gutters, the only <main> of the page; its children sit gap-region apart.
- panelInspector: 320px, hairline on the left; below xl it follows the content.
Examples
Navigation, content and an inspector
Projects
Requests
- Placeholder: client
- Placeholder: in review
Props
| Name | Type | Default | Description |
|---|---|---|---|
| nav (required) | ReactNode | – | Navigation region, usually a SideNav. |
| navLabel (required) | string | – | Accessible name of the navigation region. |
| header | ReactNode | – | Bar on top in the ink surface. Omit when a site header is already there. |
| inspector | ReactNode | – | Right region from xl: details of a selection, help. Below xl it follows the content. |
| inspectorLabel | string | – | Accessible name of the inspector. Required with inspector. |
| padded | boolean | true | Page gutters around the main content; off when the content brings its own Container. |
| preview | boolean | false | Only for a preview inside another page: no landmarks, nothing sticky. |
| children (required) | ReactNode | – | The page: PageHead, then its regions. |
Tokens used
| Token | Tier | Value | Utility |
|---|---|---|---|
| appShell.inspectorWidth | component | 320px | |
| card.padding | component | 32px | |
| container.paddingX.desktop | component | 32px | |
| container.paddingX.mobile | component | 24px | |
| nav.height | component | 64px | |
| sideNav.bg | component | #EFEDE6 | |
| sideNav.border | component | rgba(10,10,11,0.08) | |
| sideNav.width | component | 240px | |
| border.hairline | semantic | rgba(10,10,11,0.08) | |
| spacing.0 | semantic | 0px | |
| spacing.12 | semantic | 48px | |
| spacing.24 | semantic | 96px | |
| spacing.3 | semantic | 12px | |
| spacing.4 | semantic | 16px | |
| spacing.6 | semantic | 24px | |
| spacing.inline | semantic | 12px | |
| spacing.region | semantic | 48px |
Accessibility
| Check | How | Status |
|---|---|---|
| axe-core rules | Automated on every npm run check, at desktop and mobile width | Runs on every build |
| Keyboard | Automated Playwright test (scripts/keyboard.mjs) | Not applicable |
| Screen reader | Manual | Not tested yet |
Semantics and focus
- Renders the page's only <main id="main"> (the skip link target) and an <aside> per side region with its label.
- Below lg the navigation comes first in reading order, then the content, then the inspector.