layout.tsx — ui Source File
Architecture documentation for layout.tsx, a tsx file in the ui codebase. 14 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 42330d47_a82f_fbc5_51db_8d3eb776e598["layout.tsx"] 9c1a1e1b_87f8_29d5_c12d_e83869cf94e4["next"] 42330d47_a82f_fbc5_51db_8d3eb776e598 --> 9c1a1e1b_87f8_29d5_c12d_e83869cf94e4 b9af85ca_b07c_eb3e_124e_9b49a1fa2022["app"] 42330d47_a82f_fbc5_51db_8d3eb776e598 --> b9af85ca_b07c_eb3e_124e_9b49a1fa2022 8964a549_2e67_58d7_11c7_c9265d5c7971["config"] 42330d47_a82f_fbc5_51db_8d3eb776e598 --> 8964a549_2e67_58d7_11c7_c9265d5c7971 38ae4678_c419_e7a6_e1f3_9e7d305a1e73["fonts"] 42330d47_a82f_fbc5_51db_8d3eb776e598 --> 38ae4678_c419_e7a6_e1f3_9e7d305a1e73 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] 42330d47_a82f_fbc5_51db_8d3eb776e598 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 7f76bc86_08eb_afdd_d15b_ef12fce33d71["use-layout"] 42330d47_a82f_fbc5_51db_8d3eb776e598 --> 7f76bc86_08eb_afdd_d15b_ef12fce33d71 100b413d_51e5_56e4_1d60_2d6768e7fd5c["active-theme"] 42330d47_a82f_fbc5_51db_8d3eb776e598 --> 100b413d_51e5_56e4_1d60_2d6768e7fd5c 371dd337_ef60_e213_cd47_c161aaf60ec9["analytics"] 42330d47_a82f_fbc5_51db_8d3eb776e598 --> 371dd337_ef60_e213_cd47_c161aaf60ec9 96af2142_6218_7e81_b315_d8e5b5579f90["tailwind-indicator"] 42330d47_a82f_fbc5_51db_8d3eb776e598 --> 96af2142_6218_7e81_b315_d8e5b5579f90 cdd1f809_77c2_e48e_74f5_94cbdda2e14a["theme-provider"] 42330d47_a82f_fbc5_51db_8d3eb776e598 --> cdd1f809_77c2_e48e_74f5_94cbdda2e14a 2b4184c3_5c46_f908_0cc6_fa22dfa7c663["tooltip"] 42330d47_a82f_fbc5_51db_8d3eb776e598 --> 2b4184c3_5c46_f908_0cc6_fa22dfa7c663 ad74653b_d0c8_1085_7c60_ca5368097ccc["sonner"] 42330d47_a82f_fbc5_51db_8d3eb776e598 --> ad74653b_d0c8_1085_7c60_ca5368097ccc 31f31e6f_51a3_ca92_602a_455f87efcb02["tooltip"] 42330d47_a82f_fbc5_51db_8d3eb776e598 --> 31f31e6f_51a3_ca92_602a_455f87efcb02 0bbbfb7d_a56c_27a1_e781_040df4fde2cd["globals.css"] 42330d47_a82f_fbc5_51db_8d3eb776e598 --> 0bbbfb7d_a56c_27a1_e781_040df4fde2cd style 42330d47_a82f_fbc5_51db_8d3eb776e598 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { Metadata } from "next"
import { NuqsAdapter } from "nuqs/adapters/next/app"
import { META_THEME_COLORS, siteConfig } from "@/lib/config"
import { fontVariables } from "@/lib/fonts"
import { cn } from "@/lib/utils"
import { LayoutProvider } from "@/hooks/use-layout"
import { ActiveThemeProvider } from "@/components/active-theme"
import { Analytics } from "@/components/analytics"
import { TailwindIndicator } from "@/components/tailwind-indicator"
import { ThemeProvider } from "@/components/theme-provider"
import { TooltipProvider as BaseTooltipProvider } from "@/registry/bases/base/ui/tooltip"
import { Toaster } from "@/registry/bases/radix/ui/sonner"
import { TooltipProvider as RadixTooltipProvider } from "@/registry/bases/radix/ui/tooltip"
import "@/styles/globals.css"
export const metadata: Metadata = {
title: {
default: siteConfig.name,
template: `%s - ${siteConfig.name}`,
},
metadataBase: new URL(process.env.NEXT_PUBLIC_APP_URL!),
description: siteConfig.description,
keywords: ["Next.js", "React", "Tailwind CSS", "Components", "shadcn"],
authors: [
{
name: "shadcn",
url: "https://shadcn.com",
},
],
creator: "shadcn",
openGraph: {
type: "website",
locale: "en_US",
url: process.env.NEXT_PUBLIC_APP_URL!,
title: siteConfig.name,
description: siteConfig.description,
siteName: siteConfig.name,
images: [
{
url: `${process.env.NEXT_PUBLIC_APP_URL}/opengraph-image.png`,
width: 1200,
height: 630,
alt: siteConfig.name,
},
],
},
twitter: {
card: "summary_large_image",
title: siteConfig.name,
description: siteConfig.description,
images: [`${process.env.NEXT_PUBLIC_APP_URL}/opengraph-image.png`],
creator: "@shadcn",
},
icons: {
icon: "/favicon.ico",
shortcut: "/favicon-16x16.png",
apple: "/apple-touch-icon.png",
},
manifest: `${siteConfig.url}/site.webmanifest`,
alternates: {
types: {
"application/rss+xml": `${siteConfig.url}/rss.xml`,
},
},
}
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode
}>) {
return (
<html lang="en" suppressHydrationWarning className={fontVariables}>
<head>
<script
dangerouslySetInnerHTML={{
__html: `
try {
if (localStorage.theme === 'dark' || ((!('theme' in localStorage) || localStorage.theme === 'system') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.querySelector('meta[name="theme-color"]').setAttribute('content', '${META_THEME_COLORS.dark}')
}
if (localStorage.layout) {
document.documentElement.classList.add('layout-' + localStorage.layout)
}
} catch (_) {}
`,
}}
/>
<meta name="theme-color" content={META_THEME_COLORS.light} />
</head>
<body
className={cn(
"group/body overscroll-none antialiased [--footer-height:calc(var(--spacing)*14)] [--header-height:calc(var(--spacing)*14)] xl:[--footer-height:calc(var(--spacing)*24)]"
)}
>
<ThemeProvider>
<LayoutProvider>
<ActiveThemeProvider>
<NuqsAdapter>
<BaseTooltipProvider delay={0}>
<RadixTooltipProvider delayDuration={0}>
{children}
<Toaster position="top-center" />
</RadixTooltipProvider>
</BaseTooltipProvider>
</NuqsAdapter>
<TailwindIndicator />
<Analytics />
</ActiveThemeProvider>
</LayoutProvider>
</ThemeProvider>
</body>
</html>
)
}
Domain
Subdomains
Functions
Dependencies
- active-theme
- analytics
- app
- config
- fonts
- globals.css
- next
- sonner
- tailwind-indicator
- theme-provider
- tooltip
- tooltip
- use-layout
- utils
Source
Frequently Asked Questions
What does layout.tsx do?
layout.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, ContentSourcing subdomain.
What functions are defined in layout.tsx?
layout.tsx defines 1 function(s): RootLayout.
What does layout.tsx depend on?
layout.tsx imports 14 module(s): active-theme, analytics, app, config, fonts, globals.css, next, sonner, and 6 more.
Where is layout.tsx in the architecture?
layout.tsx is located at apps/v4/app/layout.tsx (domain: DocumentationAtlas, subdomain: ContentSourcing, directory: apps/v4/app).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free