sheengemologic ui
All components

AppShell

A viewport-constrained application grid with persistent chrome and a native content pane.@gemologic/sheen-patterns · application

Playground

This example has no scalar controls. Its validated source remains interactive below.

Workspace

Application content

Ready
<MetaProvider><AppShell label="Workspace" documentTitle="Workspace · Sheen" header={<h1>Workspace</h1>} statusBar={<span>Ready</span>}><p>Application content</p></AppShell></MetaProvider>

Variant matrix

Application frame

Workspace

Application content

Ready
Shared shortcut help

Application content

Anatomy

Package
@gemologic/sheen-patterns
Source
packages/patterns/src/AppShell.tsx
Tokens
  • --sheen-color-bg
  • --sheen-color-border

Accessibility

Role: main, complementary, banner, contentinfoKeyboard: Tab, Shift+Tab, PageUp, PageDown

Do

  • Load the patterns stylesheet alongside sheen styles.
  • Use one shell per document; compare complete shells in separate iframes.

Do not

  • Do not remount the shell during background refresh.
  • Do not treat the initial layout as completed router or mobile-drawer integration.

Generated props

NameTypeDefaultDescription
label *stringRequired accessible name for the primary content scrolling region.
documentTitlestringOptional accepted-route document title. Requires an app-owned MetaProvider and never derives copy from a URL.
headerJSX.ElementFixed top chrome, rendered once in a native header.
sidebarJSX.ElementRetained sidebar content, projected into desktop aside or phone modal without recreating its owner. Requires ThemeProvider; supply named navigation and constrain internal scrolling.
sidebarOpenbooleanControlled desktop sidebar visibility. Rejected proposals leave accepted state unchanged; hiding retains the sidebar DOM and removes it from interaction. Phone state is separate.
defaultSidebarOpenbooleanInitial uncontrolled desktop visibility, true by default. Uncontrolled phone drawers independently start closed and reset when returning to desktop.
onSidebarOpenChange(open: boolean) => voidProposed sidebar visibility from the shell control or mod+/ binding. Supply sidebarOpen to own acceptance and persistence.
sidebarBehavior"hide" | "collapse"hideDesktop toggle behavior. hide removes the sidebar from layout; collapse retains an interactive icon rail. Phone always uses the independent drawer.
mobileSidebarOpenbooleanControlled phone drawer state, independent of desktop sidebarOpen. Uncontrolled phone drawers start closed. Sidebar content requires ThemeProvider.
onMobileSidebarOpenChange(open: boolean) => voidPhone drawer visibility proposals from the toggle, shortcut, Escape, or outside press. Apps own controlled acceptance and persistence.
statusBarJSX.ElementFixed bottom chrome, rendered once in a native footer.
routerRouterAdapterOptional app-injected router adapter for dirty navigation blocking. Retry must bypass only this registration once. Requires the shell to be inside ThemeProvider.
contentReadybooleanDefaults to true. Set false while main-pane route content is incomplete so saved scroll restoration can wait for growth; true settles at the current clamped boundary.
shortcutHelpbooleanEnable localized help, pending indicator, global question-mark binding, and development-only mod+shift+d theme cycling. Requires app-owned ThemeProvider and ShortcutProvider ancestors; defaults to false. Apps should enable this even when character shortcuts are disabled. Development policy comes from ShortcutProvider.
Native Solid/HTML attributes remain available and are omitted from this authored-prop view.