Home / File/ layout.tsx — ui Source File

layout.tsx — ui Source File

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

File tsx DocumentationAtlas Changelog 6 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  720ecf73_022e_63c9_feae_cacee5366280["layout.tsx"]
  9c1a1e1b_87f8_29d5_c12d_e83869cf94e4["next"]
  720ecf73_022e_63c9_feae_cacee5366280 --> 9c1a1e1b_87f8_29d5_c12d_e83869cf94e4
  ba3d44f3_7b34_f9cc_6283_44817785c0df["link"]
  720ecf73_022e_63c9_feae_cacee5366280 --> ba3d44f3_7b34_f9cc_6283_44817785c0df
  ee1bd2ee_dc29_449d_093b_3c77e83b3561["announcement"]
  720ecf73_022e_63c9_feae_cacee5366280 --> ee1bd2ee_dc29_449d_093b_3c77e83b3561
  6e0d4d73_d7fe_daf9_0082_566f900d423e["colors-nav"]
  720ecf73_022e_63c9_feae_cacee5366280 --> 6e0d4d73_d7fe_daf9_0082_566f900d423e
  92027577_46c9_9cf9_86f6_c32f42e44e04["page-header"]
  720ecf73_022e_63c9_feae_cacee5366280 --> 92027577_46c9_9cf9_86f6_c32f42e44e04
  57e86e45_ac6e_7278_be08_9092724e8401["button"]
  720ecf73_022e_63c9_feae_cacee5366280 --> 57e86e45_ac6e_7278_be08_9092724e8401
  style 720ecf73_022e_63c9_feae_cacee5366280 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 { ColorsNav } from "@/components/colors-nav"
import {
  PageActions,
  PageHeader,
  PageHeaderDescription,
  PageHeaderHeading,
} from "@/components/page-header"
import { Button } from "@/registry/new-york-v4/ui/button"

const title = "Tailwind Colors in Every Format"
const description =
  "The complete Tailwind color palette in HEX, RGB, HSL, CSS variables, and classes. Ready to copy and paste into your project."

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 ColorsLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <div>
      <PageHeader>
        <Announcement />
        <PageHeaderHeading>{title}</PageHeaderHeading>
        <PageHeaderDescription>{description}</PageHeaderDescription>
        <PageActions>
          <Button asChild size="sm">
            <a href="#colors">Browse Colors</a>
          </Button>
          <Button asChild variant="ghost" size="sm">
            <Link href="/docs/theming">Documentation</Link>
          </Button>
        </PageActions>
      </PageHeader>
      <div className="hidden">
        <div className="container-wrapper">
          <div className="container flex items-center justify-between gap-8 py-4">
            <ColorsNav className="[&>a:first-child]:text-primary flex-1 overflow-hidden" />
          </div>
        </div>
      </div>
      <div className="container-wrapper">
        <div className="container py-6">
          <section id="colors" className="scroll-mt-20">
            {children}
          </section>
        </div>
      </div>
    </div>
  )
}

Subdomains

Functions

Dependencies

  • announcement
  • button
  • colors-nav
  • link
  • next
  • page-header

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): ColorsLayout.
What does layout.tsx depend on?
layout.tsx imports 6 module(s): announcement, button, colors-nav, link, next, page-header.
Where is layout.tsx in the architecture?
layout.tsx is located at apps/v4/app/(app)/colors/layout.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/app/(app)/colors).

Analyze Your Own Codebase

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

Try Supermodel Free