Patterns
Dashboard Layout
A responsive dashboard shell with sidebar, header, and scrollable content area.
Overview
The DashboardLayout recipe provides a full-page dashboard shell with a desktop sidebar, mobile drawer navigation, optional header, and a scrollable content area inside a Container.
Dashboard
JD
Revenue
$45k
Users
2.3k
Orders
1.2k
CVR
3.2%
Chart Area
Usage
import { DashboardLayout } from '@/recipes/dashboard-layout';
import { SidebarNavigation } from '@/recipes/sidebar-navigation';
import { Navbar } from '@/recipes/navbar';
<DashboardLayout
sidebar={<SidebarNavigation groups={navGroups} currentPath="/" />}
header={<Navbar logo={<span>MyApp</span>} links={links} />}
>
<DashboardStats stats={stats} />
</DashboardLayout>API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
sidebar | ReactNode | — | Sidebar content |
header | ReactNode | — | Optional header/navbar |
children | ReactNode | — | Main content area |
className | string | — | Additional CSS classes |
Responsive Behavior
- Desktop (lg+): Sidebar visible as a fixed aside panel
- Mobile: Sidebar collapses into a Drawer, triggered via hamburger button
Related Recipes
- Sidebar Navigation — Sidebar content
- Navbar — Header content
- Dashboard Stats — Stat cards for the content area