Home / File/ layout.tsx — ui Source File

layout.tsx — ui Source File

Architecture documentation for layout.tsx, a tsx file in the ui codebase. 8 imports, 0 dependents.

File tsx DocumentationAtlas Changelog 8 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  0bb92ff6_ea24_5e31_f054_588865022637["layout.tsx"]
  9c1a1e1b_87f8_29d5_c12d_e83869cf94e4["next"]
  0bb92ff6_ea24_5e31_f054_588865022637 --> 9c1a1e1b_87f8_29d5_c12d_e83869cf94e4
  ba3d44f3_7b34_f9cc_6283_44817785c0df["link"]
  0bb92ff6_ea24_5e31_f054_588865022637 --> ba3d44f3_7b34_f9cc_6283_44817785c0df
  ee1bd2ee_dc29_449d_093b_3c77e83b3561["announcement"]
  0bb92ff6_ea24_5e31_f054_588865022637 --> ee1bd2ee_dc29_449d_093b_3c77e83b3561
  a02ed158_ee1f_bcce_2ef6_260908f74dd9["examples-nav"]
  0bb92ff6_ea24_5e31_f054_588865022637 --> a02ed158_ee1f_bcce_2ef6_260908f74dd9
  92027577_46c9_9cf9_86f6_c32f42e44e04["page-header"]
  0bb92ff6_ea24_5e31_f054_588865022637 --> 92027577_46c9_9cf9_86f6_c32f42e44e04
  f910415c_c3ff_91b6_b6c2_62b5349d5a9b["page-nav"]
  0bb92ff6_ea24_5e31_f054_588865022637 --> f910415c_c3ff_91b6_b6c2_62b5349d5a9b
  67800f29_74f5_e4fd_f69d_c0bb44ef1ca5["theme-selector"]
  0bb92ff6_ea24_5e31_f054_588865022637 --> 67800f29_74f5_e4fd_f69d_c0bb44ef1ca5
  57e86e45_ac6e_7278_be08_9092724e8401["button"]
  0bb92ff6_ea24_5e31_f054_588865022637 --> 57e86e45_ac6e_7278_be08_9092724e8401
  style 0bb92ff6_ea24_5e31_f054_588865022637 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { type Metadata } from "next"
import Link from "next/link"

import { Announcement } from "@/components/announcement"
import { ExamplesNav } from "@/components/examples-nav"
import {
  PageActions,
  PageHeader,
  PageHeaderDescription,
  PageHeaderHeading,
} from "@/components/page-header"
import { PageNav } from "@/components/page-nav"
import { ThemeSelector } from "@/components/theme-selector"
import { Button } from "@/registry/new-york-v4/ui/button"

export const dynamic = "force-static"
export const revalidate = false

const title = "The Foundation for your Design System"
const description =
  "A set of beautifully designed components that you can customize, extend, and build on. Start here then make it your own. Open Source. Open Code."

export const metadata: Metadata = {
  title,
  description,
  openGraph: {
    images: [
      {
        url: `/og?title=${encodeURIComponent(
          title
        )}&description=${encodeURIComponent(description)}`,
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    images: [
      {
        url: `/og?title=${encodeURIComponent(
          title
        )}&description=${encodeURIComponent(description)}`,
      },
    ],
  },
}

export default function ExamplesLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <>
      <PageHeader>
        <Announcement />
        <PageHeaderHeading className="max-w-4xl">{title}</PageHeaderHeading>
        <PageHeaderDescription>{description}</PageHeaderDescription>
        <PageActions>
          <Button asChild size="sm">
            <Link href="/docs/installation">Get Started</Link>
          </Button>
          <Button asChild size="sm" variant="ghost">
            <Link href="/docs/components">View Components</Link>
          </Button>
        </PageActions>
      </PageHeader>
      <PageNav id="examples" className="hidden md:flex">
        <ExamplesNav className="[&>a:first-child]:text-primary flex-1 overflow-hidden" />
        <ThemeSelector className="mr-4 hidden md:flex" />
      </PageNav>
      <div className="container-wrapper section-soft flex flex-1 flex-col pb-6">
        <div className="theme-container container flex flex-1 scroll-mt-20 flex-col">
          <div className="bg-background flex flex-col overflow-hidden rounded-lg border bg-clip-padding has-[[data-slot=rtl-components]]:overflow-visible has-[[data-slot=rtl-components]]:border-0 has-[[data-slot=rtl-components]]:bg-transparent md:flex-1 xl:rounded-xl">
            {children}
          </div>
        </div>
      </div>
    </>
  )
}

Subdomains

Functions

Dependencies

  • announcement
  • button
  • examples-nav
  • link
  • next
  • page-header
  • page-nav
  • theme-selector

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, Changelog subdomain.
What functions are defined in layout.tsx?
layout.tsx defines 1 function(s): ExamplesLayout.
What does layout.tsx depend on?
layout.tsx imports 8 module(s): announcement, button, examples-nav, link, next, page-header, page-nav, theme-selector.
Where is layout.tsx in the architecture?
layout.tsx is located at apps/v4/app/(app)/examples/layout.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/app/(app)/examples).

Analyze Your Own Codebase

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

Try Supermodel Free