App Shell

Application shell layout with sidebar and topbar

SaaSNavigation

Overview

AppShell provides the main layout structure for SaaS applications. It manages the sidebar and topbar positioning, handles responsive collapsing, and provides a NavigationProvider context for coordinating navigation state across child components.

Usage

import { AppShell, Sidebar, Topbar } from "@leanicon/web-builder-library/saas";

<AppShell sidebar={<Sidebar>...</Sidebar>} topbar={<Topbar>...</Topbar>}>
  <main>Page content</main>
</AppShell>;

Variants

Default

Dashboard

Welcome back! Here's an overview of your workspace.

Default Collapsed

Dashboard

Sidebar starts in collapsed state.

No Sidebar

Full Width Layout

AppShell without a sidebar renders full-width content.

Dark

Dashboard

Dark mode layout with sidebar and topbar.

Props

NameTypeDefaultRequiredDescription
childrenReactNode—YesChild content (main page content)
sidebarReactNode—NoSidebar component
topbarReactNode—NoTopbar component
sidebarCollapsedboolean—NoWhether sidebar is collapsed (controlled)
onSidebarCollapsedChange((collapsed: boolean) => void)—NoCallback when sidebar collapse state changes
defaultSidebarCollapsedboolean—NoDefault sidebar collapsed state (uncontrolled mode)