Home / Function/ DashboardLayout() — ui Function Reference

DashboardLayout() — ui Function Reference

Architecture documentation for the DashboardLayout() function in layout.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  c9d9f98e_7b32_bcdd_fc4e_d1edaa9cead5["DashboardLayout()"]
  62c3c472_b815_e2bd_49eb_0c9bf5838e65["layout.tsx"]
  c9d9f98e_7b32_bcdd_fc4e_d1edaa9cead5 -->|defined in| 62c3c472_b815_e2bd_49eb_0c9bf5838e65
  style c9d9f98e_7b32_bcdd_fc4e_d1edaa9cead5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/app/(examples)/dashboard-03/layout.tsx lines 10–29

export default async function DashboardLayout({
  children,
}: {
  children: React.ReactNode
}) {
  const cookieStore = await cookies()
  const defaultOpen = cookieStore.get("sidebar_state")?.value === "true"

  return (
    <main className="[--header-height:calc(theme(spacing.14))]">
      <SidebarProvider defaultOpen={defaultOpen} className="flex flex-col">
        <SiteHeader />
        <div className="flex flex-1">
          <AppSidebar />
          <SidebarInset>{children}</SidebarInset>
        </div>
      </SidebarProvider>
    </main>
  )
}

Subdomains

Frequently Asked Questions

What does DashboardLayout() do?
DashboardLayout() is a function in the ui codebase, defined in apps/v4/app/(examples)/dashboard-03/layout.tsx.
Where is DashboardLayout() defined?
DashboardLayout() is defined in apps/v4/app/(examples)/dashboard-03/layout.tsx at line 10.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free