Skip to content

Components

AppShell: the sidebar, the top bar and the page

AppShell is the frame of every app built on Meadowstack: the sidebar with its modules, the top bar, the page as an inset panel, the assistant's column and the bell. It goes once at the root of the app, and every screen inside it follows the same navigation rules, on a desktop and in a drawer on a phone.

By Bohuslav PoláčekChecked

Stonebridge's app in the demo as Robert Brooks sees it on the crews screen. A running app also draws the chip behind the current item, the crumb and the screen's primary action in the top bar, which scripts place and a page built ahead of time leaves out.

What it is for

An internal app needs the same frame on every screen, and AppShell is that frame. The desktop has the sidebar on the frame colour with the page as an inset panel beside it. The sidebar holds the company's name, a search field that opens the palette, one section per module with its items and counts, and at its foot the account, settings and help. The top bar above the page has the crumbs, the screen's primary action, the bell and the assistant's button, and the assistant opens as a column the page makes room for.

The preview is the Stonebridge example on the crews screen: four modules (Sites, Plan, Site work, Money), the current item with its filled icon, grey counts such as the eight people with expired or missing certificates, and Robert Brooks's bell with three unread beside the site assistant's button. On a phone the same sidebar opens in a drawer from the menu button.

The manifest's when is short: once at the root of every app. Its not: inside a page, or beside a second navigation such as a tab bar or a module rail.

What the shell does

  • The sidebar collapses smoothly and peeks from the left edge when hidden, with a short delay against accidents; Cmd or Ctrl+B hides it, its edge drags, a double-click resets it.
  • Hover is half a step and the active item a full step on the frame's own state tokens (nav-hover, nav-active); the active chip slides to the new item and the icon becomes its filled twin.
  • Modules are sections of one sidebar, and Alt+1 to Alt+9 open the Nth module.
  • The top bar gets a hairline and a small shadow once the page has scrolled under it.
  • A side panel open on a wide screen locks the page behind it, so only one thing scrolls.
  • The assistant's column and the sidebar's edge resize with ResizeHandle: free within limits, resisting below the minimum, folding away past it.

All of these are rows of docs/patterns.md, Shell and navigation, each with the place in the demo to try it.

The rules and where they live

  • Navigation is one sidebar. The root AGENTS.md (Apps do work, and people never get lost) and docs/principles.md: with two or more modules each is a section named after it, all unfolded, and the module rail and the phone tab bar the app once had were removed on 22 Oct 2026.
  • Counts are NavBadge, grey, red only when overdue. AGENTS.md.
  • Saved views are ViewPills, never sidebar items; another presentation of the same page is one DisplayMenu button. AGENTS.md, so the sidebar never grows a third level.
  • The current sidebar item is one of the crumbs or the h1. AGENTS.md; checked on every route of the demo and the starter by the orientation rule nav-matches-crumbs (templates/starter/e2e/orientation.ts, docs/audit.md).
  • The active item shows its filled twin. AGENTS.md; the static guard nav-filled-icon in scripts/check-markup.mjs fails a nav item with icon and no activeIcon, and the runtime rule nav-filled looks at the page.
  • The page never scrolls; exactly one region does. AGENTS.md; the runtime rules page-scroll and nested-scroll, the static rule own-scroll, and sidebar-overflow for the sidebar itself.
  • Settings are the gear at the foot beside help, the account at the foot, the bell in the top bar beside the assistant. AGENTS.md, the same four settings pages in every app.
  • Keyboard: Cmd/Ctrl+K the palette, Cmd/Ctrl+B the sidebar, Alt+1 to 9 the modules, Cmd/Ctrl+/ the shortcuts, no single-character shortcuts (WCAG 2.1.4). AGENTS.md and docs/principles.md.

What AI coding tools write instead

The manifest names a hand-built sidebar, top bar or layout grid and a phone tab bar. A tool asked for "an admin layout" writes a flex row with a fixed sidebar and a header, and the problems follow from there: the whole page scrolls and takes the sidebar with it, or the sidebar and the content each get a scrollbar; saved filters become sidebar items, so a third level appears; the active item is a coloured bar in an accent colour; the breadcrumbs say something else than the sidebar; the phone gets five icons in a tab bar that cannot hold the modules; and a single-key shortcut fires while someone types in a field.

Meadowstack keeps all of that in one component and checks the rest on every route: the crumbs against the sidebar, the filled icons, one scroll region, one row under the header. The rules the checks enforce are what the guide for AI coding tools puts in front of the tool before it writes a line.

How to use it

Screens inside use Screen archetype and the shell's hooks (useBreadcrumbs, useScreenTitle, useTopbarActionSlot) to fill the top bar.

Its entry in the manifest

The component's rules as the kit's manifest states them, the same entry an AI coding tool reads.Read from the kit's component manifest when the site was built (126 components, packages/kit/src/components.json); the same entry answers an AI coding tool through the kit's MCP server.

How the starter calls it

templates/starter/src/workspace/layout.tsx
<AppShell
  brand={<AppBrand />}
  modules={navModules}
  activeModule={activeId}
  settings={{ href: SETTINGS_PATH, label: "Settings", active: inPath(SETTINGS_PATH) }}
  search={{ onOpen: () => setPaletteOpen(true), shortcut: "mod+k" }}
  help={<AppHelp />}
  account={<AccountMenu />}
  scrollKey={location.pathname}
  // Back, Forward and a replaced page (a saved form, a deleted record) are not steps forward: the shell's
  // "‹ previous page" link must not offer the page that is gone from the history.
  restoreScroll={navigationType !== "PUSH"}
  pending={navigation.state === "loading"}
  appTitle={brand.shortName}
  // viewTransition: the page cross-fades where the browser supports it (the kit's styles).
  renderLink={(link, { children, ...props }) => (
    <Link to={link.href} viewTransition {...props}>
      {children}
    </Link>
  )}
>
  <Outlet />
</AppShell>
The starter's root: the modules from the app's registry, the palette on Cmd or Ctrl+K, settings, help and the account at the foot, and the router's link for every item.

Questions

Which shortcut opens the palette?

Cmd+K on a Mac and Ctrl+K elsewhere, from anywhere in the app; the search field at the top of the sidebar opens the same palette. Cmd or Ctrl+B hides and shows the sidebar, and Alt+1 to Alt+9 open the modules in order.

What does the shell look like on a phone?

The same sidebar opens in a drawer from the menu button, and the header keeps the app's name and the bell. There is no tab bar: one navigation works the same on every screen size.

Where do saved views of a list go?

Not in the sidebar. Saved views of the same list are pills on the page and entries in the palette; another entity gets its own sidebar item, so the sidebar never grows a third level.

Can a module have its own navigation?

No second navigation: a module is a section of the one sidebar, named after it, with its items. Another presentation of the same page, such as a board or a calendar, is one display button on the page.

Where do settings and the account live?

At the foot of the sidebar: the account, the gear for settings and the question mark for help. Settings are the same four pages in every app: General, Team and roles, Connected apps, MCP and AI.

Two ways

Build it yourself, or have it built

  • Build it yourself

    Build your app on the framework

    Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.

    One payment, lifetime updates

    Get the framework
  • Have it built

    Have us build your app

    Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.

    After launch, Care keeps it improving, from €99 a month.

    from €1,990

    Describe your app