Home / File/ welcome-dialog.tsx — ui Source File

welcome-dialog.tsx — ui Source File

Architecture documentation for welcome-dialog.tsx, a tsx file in the ui codebase. 4 imports, 0 dependents.

File tsx DesignEngine PreviewSystem 4 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  4099d823_3d75_f333_e8a0_0c31c755634b["welcome-dialog.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  4099d823_3d75_f333_e8a0_0c31c755634b --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  aae3c3f1_230a_9c11_a663_8bbc3f0ad054["icons"]
  4099d823_3d75_f333_e8a0_0c31c755634b --> aae3c3f1_230a_9c11_a663_8bbc3f0ad054
  57e86e45_ac6e_7278_be08_9092724e8401["button"]
  4099d823_3d75_f333_e8a0_0c31c755634b --> 57e86e45_ac6e_7278_be08_9092724e8401
  0896a8fa_5462_a73a_5add_fb8176921778["dialog"]
  4099d823_3d75_f333_e8a0_0c31c755634b --> 0896a8fa_5462_a73a_5add_fb8176921778
  style 4099d823_3d75_f333_e8a0_0c31c755634b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"

import { Icons } from "@/components/icons"
import { Button } from "@/registry/new-york-v4/ui/button"
import {
  Dialog,
  DialogClose,
  DialogContent,
  DialogDescription,
  DialogFooter,
  DialogHeader,
  DialogTitle,
} from "@/registry/new-york-v4/ui/dialog"

const STORAGE_KEY = "shadcn-create-welcome-dialog"

export function WelcomeDialog() {
  const [isOpen, setIsOpen] = React.useState(false)

  React.useEffect(() => {
    const dismissed = localStorage.getItem(STORAGE_KEY)
    if (!dismissed) {
      setIsOpen(true)
    }
  }, [])

  const handleOpenChange = (open: boolean) => {
    setIsOpen(open)
    if (!open) {
      localStorage.setItem(STORAGE_KEY, "true")
    }
  }

  return (
    <Dialog open={isOpen} onOpenChange={handleOpenChange}>
      <DialogContent
        showCloseButton={false}
        className="dialog-ring max-w-[23rem] min-w-0 gap-0 overflow-hidden rounded-xl p-0 sm:max-w-sm dark:bg-neutral-900"
      >
        <div className="flex aspect-[2/1.2] w-full items-center justify-center rounded-t-xl bg-neutral-950 text-center text-neutral-100 sm:aspect-[2/1]">
          <div className="font-mono text-2xl font-bold">
            <Icons.logo className="size-12" />
          </div>
        </div>
        <DialogHeader className="gap-1 p-4">
          <DialogTitle className="text-left text-base">
            Build your own shadcn/ui
          </DialogTitle>
          <DialogDescription className="text-foreground text-left leading-relaxed">
            Customize everything from the ground up. Pick your component
            library, font, color scheme, and more.
          </DialogDescription>
          <DialogDescription className="text-foreground mt-2 text-left leading-relaxed font-medium">
            Available for Next.js, Vite, TanStack Start, and v0.
          </DialogDescription>
        </DialogHeader>
        <DialogFooter className="p-4 pt-0">
          <DialogClose asChild>
            <Button className="w-full rounded-lg shadow-none">
              Get Started
            </Button>
          </DialogClose>
        </DialogFooter>
      </DialogContent>
    </Dialog>
  )
}

Domain

Subdomains

Functions

Dependencies

  • button
  • dialog
  • icons
  • react

Frequently Asked Questions

What does welcome-dialog.tsx do?
welcome-dialog.tsx is a source file in the ui codebase, written in tsx. It belongs to the DesignEngine domain, PreviewSystem subdomain.
What functions are defined in welcome-dialog.tsx?
welcome-dialog.tsx defines 1 function(s): WelcomeDialog.
What does welcome-dialog.tsx depend on?
welcome-dialog.tsx imports 4 module(s): button, dialog, icons, react.
Where is welcome-dialog.tsx in the architecture?
welcome-dialog.tsx is located at apps/v4/app/(create)/components/welcome-dialog.tsx (domain: DesignEngine, subdomain: PreviewSystem, directory: apps/v4/app/(create)/components).

Analyze Your Own Codebase

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

Try Supermodel Free