Skip to content
nexubDesign System
v11.9.0

Components · Layout

App Shell

StableAdded v0.0.1

Full-height application frame: a header row over a body with a sidebar slot and a scrolling main region.

import { AppShell } from '@nexub/react';
View as Markdown

Usage

Use it for
  • The outer frame of a product or dashboard: header, side navigation, content

Use something else for
  • Marketing or content pages: use `Section` and `Container`

  • A single panel inside a page: use `Grid` or `Flex`

Examples

Header, sidebar and main

nexub

Page content scrolls here, under a fixed header and sidebar.

Props

Props
PropTypeDefaultDescription
AppShell.Rootcompound—Viewport-height grid (h-screen): header row, then the body. Override the height with className when it is not the whole page.
AppShell.Headercompound—First row, e.g. a TopNav.Root.
AppShell.Bodycompound—Second row: lays out the sidebar and main side by side.
AppShell.Sidebarcompound—Fixed-width column that scrolls on its own, e.g. a Sidebar.Root.
AppShell.Maincompound—The <main> landmark: takes the remaining width, scrolls on its own, padded by default.
...propsReact.HTMLAttributes<HTMLDivElement>—Every part forwards its ref and HTML attributes.
onOpenChange((open: boolean) => void)—
openboolean—10.6: the mobile navigation drawer (see AppShell.Sidebar's drawerBelow), controlled.

On iOS & Android