Skip to content
Playground

App Shell

A responsive application frame for top navigation, side navigation, and main content.

AppShell assembles the outer product frame while leaving navigation and page content composition to Header and SideNav. Its outer canvas uses --background-default, separating the SideNav and content surfaces that use --sidebar (#eceff1 in light mode and #0f0f0f in dark mode). The document remains the scrolling container, so the side navigation can stay sticky without trapping content in a nested scroller.

TSX
import { AppShell, Header, SideNav } from "@zentara-co/zenos-ui";
AppShell├── banner├── sideNav├── topNav└── main content

Pass complete navigation components into the named regions. AppShell owns the main landmark, responsive compact-navigation state, skip link, and overall surface hierarchy.

On desktop and tablet landscape, sideNav stays at inline start and controls its own collapsed state. On mobile and tablet portrait, AppShell keeps a collapsed rail in the layout. Activating SideNav.Toggle opens the same navigation in an inline-start sheet—left in LTR and right in RTL. Selecting a navigation item closes that sheet.

Use sideNavOpen, defaultSideNavOpen, and onSideNavOpenChange when application state must observe or control the compact sheet. Use SideNav’s collapsed API only when SideNav is outside AppShell.

height="fill" gives the shell a minimum viewport height. height="auto" follows its content, which is useful when the shell is embedded in another surface. In both modes, the document owns vertical scrolling and the navigation remains sticky.

contentPadding accepts the shared responsive spacing scale:

TSX
<AppShell contentPadding={{ base: "4", lg: "8" }}>  <Dashboard /></AppShell>

Variants

height: fillheight: auto
AppShell
Header
SideNav

API

PropTypeDefaultDescription
banner / topNav / sideNav ReactNode — Named shell regions.
sideNavOpen boolean — Controlled compact navigation sheet state.
defaultSideNavOpen boolean false Initial compact navigation state.
onSideNavOpenChange (open: boolean) => void — Runs when compact navigation changes.
sideNavLabel string Navigation Accessible name for the compact navigation sheet.
contentPadding Responsive<Spacing> 0 Main-region padding.
height fill | auto fill Viewport or content-based shell height.
skipLinkLabel string Skip to content Accessible text for the keyboard skip link.
native props React.HTMLAttributes<HTMLDivElement> — Forwards native attributes, events, aria-*, data-*, className, style, and ref.

Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props, including className, style, aria-*, and data-*.

AppShell renders a main landmark and a keyboard-accessible skip link. Give the side navigation a meaningful aria-label; sideNavLabel names the compact navigation dialog and its trigger. Keep only one top-level AppShell per application view.