DS0
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

PropTypeDefaultDescription
sidebarReactNodeSidebar content
headerReactNodeOptional header/navbar
childrenReactNodeMain content area
classNamestringAdditional CSS classes

Responsive Behavior

  • Desktop (lg+): Sidebar visible as a fixed aside panel
  • Mobile: Sidebar collapses into a Drawer, triggered via hamburger button

On this page