Skip to content
Components

App shell

BetaBeta — the props contract is close to final, but small breaking changes can still land.

The application container: persistent navigation and header around changing page content, with one shared scroll policy.

The outlined area is the AppShell container. Collapse the sidebar or toggle loading: the frame stays in place while page content changes. This embedded preview uses layout="contained"; a full application uses the default viewport layout.

Composition

Persistent application frame

AppShell includes SidebarProvider. Set scroll once: page uses the document, inset lets PageLayout scroll, and none lets workspace panes own scrolling. Keep the shell mounted while route content loads.

  • <AppShell>
    • <Sidebar>
      • <SidebarContent />
      • <SidebarRail />
      </Sidebar>
    • <AppShellContent>
      • <AppShellHeader>
        • <SidebarTrigger />
        </AppShellHeader>
      • <PageLayout>
        • <PageHeader>
          • <PageTitle />
          </PageHeader>
        • <PageBody>
          • route content
          </PageBody>
        </PageLayout>
      </AppShellContent>
    </AppShell>

Installation

The Control UI source installs this primitive from src/registry/sources/control-ui/ui/app-shell.tsx.

Registry command
See registry manifest

Dependencies

Raw code

Primary installed source

src/registry/sources/control-ui/ui/app-shell.tsx

Knobs

Typed custom properties the recipe paints with. Set one on the root — style, a utility class, or a skin — and every slot inherits it.

--cui-app-shell-header-* · 5 knobsHow the cascade resolves
--cui-app-shell-header-height<length-percentage>calc(var(--spacing) * 14)
--cui-app-shell-header-padding-inline<length-percentage>calc(var(--spacing) * 4)
--cui-app-shell-header-background<color>var(--background)
--cui-app-shell-header-border-color<color>var(--border)
--cui-app-shell-header-border-width<length>1px