Skip to content

Phase 4 — App shell layout primitives #5

@jonmatum

Description

@jonmatum

Phase 4 — App shell layout primitives

The actual "shell" — composing primitives into reusable page chrome.

Components

  • AppShell — root container orchestrating sidebar, topbar, content, footer
  • Sidebar — collapsible, resizable, persisted state, mobile-drawer mode, nested nav support
    • Variants: icon, compact, expanded, floating
  • TopBar — slots for left (brand + breadcrumb), center (search / command trigger), right (user menu, theme toggle, notifications)
  • CommandBar — ⌘K palette on top of the Command primitive; registerable action providers
  • PageHeader — title, description, breadcrumb, action slot
  • ContentContainer — max-width, density-aware padding, scroll behavior
  • Footer — optional slot
  • EmptyState, ErrorState, LoadingState — standardized status surfaces

Requirements

  • Fully responsive (mobile / tablet / desktop)
  • RSC-compatible where feasible (AppShell is a server component; interactive parts are client islands)
  • All composition via slots/props — no hardcoded content
  • Layout state (sidebar collapsed, theme, density) persisted via cookies so SSR matches first paint

Acceptance

  • A consumer app using <AppShell sidebar={<Nav/>} topBar={<TopBar/>}>{children}</AppShell> gets a complete, responsive shell
  • Sidebar collapsed state survives reload with no flicker
  • All pieces render correctly in both themes using only semantic tokens

Depends on Phase 3.

Part of the next-shell app shell extraction plan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions