Skip to content

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

Change the props. The controls come from the documented props.

Workspace

Overview

tsx
<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

Do
  • 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.
Don’t
  • 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

The parts of the component and what each one does, as in the playground above.
  1. containerHeader on top, then navigation, main and inspector side by side from lg (inspector from xl).
  2. groupNavigation region in the sunken side-nav tone with a hairline on the right; sticky below the header.
  3. bodyMain region: fluid width, page gutters, the only <main> of the page; its children sit gap-region apart.
  4. panelInspector: 320px, hairline on the left; below xl it follows the content.

Examples

Type-checked, and the same code goes into the AI manifest. Import: import { AppShell } from "@/ds";

Navigation, content and an inspector

Projects

Requests

Placeholder: all open requests, newest first.
Client
Placeholder: client
Status
Placeholder: in review

Props

Checked against the component's TypeScript type on every build.
AppShell props
NameTypeDefaultDescription
nav (required)ReactNode–Navigation region, usually a SideNav.
navLabel (required)string–Accessible name of the navigation region.
headerReactNode–Bar on top in the ink surface. Omit when a site header is already there.
inspectorReactNode–Right region from xl: details of a selection, help. Below xl it follows the content.
inspectorLabelstring–Accessible name of the inspector. Required with inspector.
paddedbooleantruePage gutters around the main content; off when the content brings its own Container.
previewbooleanfalseOnly for a preview inside another page: no landmarks, nothing sticky.
children (required)ReactNode–The page: PageHead, then its regions.

Tokens used

Derived from the utility classes in the component's source. Copy a class with one click.
Tokens used by AppShell
TokenTierValueUtility
appShell.inspectorWidthcomponent320px
card.paddingcomponent32px
container.paddingX.desktopcomponent32px
container.paddingX.mobilecomponent24px
nav.heightcomponent64px
sideNav.bgcomponent#EFEDE6
sideNav.bordercomponentrgba(10,10,11,0.08)
sideNav.widthcomponent240px
border.hairlinesemanticrgba(10,10,11,0.08)
spacing.0semantic0px
spacing.12semantic48px
spacing.24semantic96px
spacing.3semantic12px
spacing.4semantic16px
spacing.6semantic24px
spacing.inlinesemantic12px
spacing.regionsemantic48px

Accessibility

What is checked automatically on every build, and what a person has tested. Nothing is marked as tested unless it was.
Testing status by check
CheckHowStatus
axe-core rulesAutomated on every npm run check, at desktop and mobile widthRuns on every build
KeyboardAutomated Playwright test (scripts/keyboard.mjs)Not applicable
Screen readerManualNot 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.