Skip to Content
Documentation
Getting startedComponentsChartsTheming
Get Pro
Overview
Concepts

App Shell

The App Shell defines the main structure of your app.

SourceStorybookRecipe
Home
Contacts
Settings

Home

Your application content

Anatomy

import { AppShell } from '#components/ui/app-shell'
<AppShell
  header={<Navbar.Root />}
  sidebar={<Sidebar.Root />}
  aside={<Aside.Root />}
  footer={<Footer />}
>
  {/* Main content */}
</AppShell>

Usage

The AppShell component provides a structured layout container that helps you build consistent application interfaces. It manages the composition and positioning of key UI elements like navbars and sidebars.

The header and footer slots span the full width of the shell. The sidebar (left) and aside (right) slots are rendered next to the main content area, which contains the children and scrolls independently.

AppShell fits itself into the viewport by default, using height="100dvh". Set the height prop to constrain it, or use the fullscreen prop to fix it to the viewport instead.

Use the header slot to render a Navbar above the main content.

  • Home
  • About
  • Pricing
Your application content

Use the sidebar slot to render a Sidebar next to the main content. The sidebar requires a Sidebar.Provider around the shell to manage its state.

Home
Contacts

Contacts

Your application content

Aside

Use the aside slot to render a secondary Aside panel on the right side of the main content, for example to show details of a selected item.

Contacts

Your application content

Details

Contact details

Fullscreen

Use the fullscreen prop to fix the shell to the viewport. This prevents scroll bouncing of the entire page, giving your app a native feel.

<AppShell fullscreen>{/* Main content */}</AppShell>

Props

AppShell

PropDefaultType
header
React.ReactNode

The top header navigation

sidebar
React.ReactElement

Main sidebar, positioned on the left

aside
React.ReactNode

Secondary sidebar, positioned on the right

footer
React.ReactNode

The footer

Previous

Alert

Next

Avatar