Shells

Application shell layouts for web apps, dashboards, and admin interfaces. Header, sidebar, and content area patterns.

Overview

App shells define the overall structure of your application, organizing navigation, content areas, and auxiliary panels. Choose a layout based on your application's navigation needs and content complexity.

Key features:

  • Semantic HTML5 structure with header, nav, main, and aside
  • Responsive layouts that adapt to different screen sizes
  • Flexible content areas using layout primitives
  • Accessible navigation patterns with proper ARIA labels

Stacked Layout

The traditional layout with a header on top and main content below. Best for content-focused applications where vertical space is important.

Sidebar + Content

A fixed sidebar navigation with a main content area. Ideal for dashboards and admin interfaces with many navigation items.

Multi-Column Layout

A three-column layout with sidebar navigation, main content, and a right panel. Perfect for email clients, chat applications, or content management systems.

Collapsible Sidebar

A sidebar that can collapse to icons only, using native <details> and <summary> elements. Great for maximizing content space while keeping navigation accessible.

Configuration

App shells use these layout elements and attributes:

Page Layout

Attribute Values Description
data-page-layout stack sidebar-left sidebar-right holy-grail app-shell dashboard Sets the overall page layout grid template.
data-layout-sidebar-width narrow normal wide Sets the sidebar column width. Default is approximately 17.5rem.
data-layout-gap none xs s m l xl Gap between layout regions.
data-layout-content-min 40% 50% 60% Minimum content width before stacking. Default is 50%.

Layout Stack

Attribute Values Description
data-layout-gap none xs s m l xl Vertical spacing between stack items.

Layout Cluster

Attribute Values Description
data-layout-gap none xs s m l xl Horizontal spacing between items.
data-layout-justify start center end between Horizontal alignment of items.
data-layout-align start center end stretch Vertical alignment of items.

Usage Notes

  • Full height: data-page-layout handles this automatically with min-height: 100dvh
  • Sticky elements: Use the data-layout-sticky attribute on nav or aside elements
  • Responsive: data-page-layout layouts auto-stack on narrow viewports (< 768px)
  • Collapsible sidebar: Use <details>/<summary> inside <nav> for zero-JS collapse
  • Accessibility: Include skip links, proper heading hierarchy, and ARIA labels on navigation landmarks

Related

Dashboard

Stats cards, tables, and chart layouts

Sidebar Navigation

Vertical navigation patterns

Settings

Settings page with tabs and forms

Profile

User profile layouts and cards