For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/v0.4.0/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/v0.4.0/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/v0.4.0/en/components/app-shell.md.

App Shell

The App Shell establishes persistent task context beside an open product canvas. It can own a bounded preview or the full visual viewport.

Live preview

Design system workspace

Application composition preview
Live pattern

Compose product UI from stable primitives.

Resize the viewport or collapse navigation. Content remains bounded and scrollable.

Task sessionActive · 2 tools
ConfigurationValidated · ACL

Usage

<div class="app-shell" data-navigation="expanded">
  <aside data-app-navigation>...</aside>
  <main data-app-main>
    <header class="workspace-header">
      <button type="button" data-app-navigation-trigger>Toggle navigation</button>
    </header>
    <div data-app-content>...</div>
  </main>
</div>

Parameters

ParameterValuesDefaultPurpose
data-navigationexpanded, collapsed, hiddenexpandedDesktop navigation state
data-mobile-navigationopen, omittedomittedMobile drawer visibility
data-app-navigation-triggerpresent, omittedomittedToggles desktop navigation or the compact drawer
data-viewportwindow, omittedomittedMakes the shell own 100dvh
--app-shell-navigation-sizeCSS length15.5remExpanded navigation width
--app-shell-navigation-collapsed-sizeCSS length2.875remOffice-aligned icon-rail width
--app-shell-navigation-max-sizeCSS length or percentage38%Maximum expanded-navigation share
--app-shell-heightCSS length or autoautoOptional bounded shell height
--app-shell-min-heightCSS length36remMinimum shell height

JavaScript API

Import @a3s-lab/ui/all, or import @a3s-lab/ui/runtime before @a3s-lab/ui/app-shell. The controller exposes expandNavigation(), collapseNavigation(), hideNavigation(), openNavigation(), closeNavigation(), toggleNavigation(), and refresh() on the shell root. It dispatches a3s:app-navigation-change with { navigation, mobileOpen, mode, source } after a transition. Optional data-app-navigation-open-label, data-app-navigation-close-label, data-app-navigation-expand-label, and data-app-navigation-collapse-label values override the localized trigger labels.

States and variants

The shell has expanded, collapsed, hidden, full-viewport, and mobile-open states. Below 768px the navigation becomes a contained overlay. The controller marks the closed navigation inert and aria-hidden="true", opens it above the local backdrop, moves focus to its first control, and closes it on Escape, backdrop activation, or destination selection. Navigation and main content own separate scroll regions. A host may persist data-navigation and coordinate it with routing; call refresh() after programmatic state changes when immediate synchronization is required.

Accessibility

Use landmark elements (aside, nav, main, header) and name each navigation region. The controller keeps aria-expanded, the trigger label, inert, and aria-hidden synchronized and restores trigger focus after dismissing the compact drawer. Keep navigation DOM-adjacent to the shell so the contained backdrop cannot cover unrelated page content.