Home / Function/ DialogCloseButton() — ui Function Reference

DialogCloseButton() — ui Function Reference

Architecture documentation for the DialogCloseButton() function in dialog-close-button.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  953005f6_d95f_6f12_9cd1_92f1abf4cf75["DialogCloseButton()"]
  60ce02a0_5e1b_3c46_19be_3c3dd8fb60f8["dialog-close-button.tsx"]
  953005f6_d95f_6f12_9cd1_92f1abf4cf75 -->|defined in| 60ce02a0_5e1b_3c46_19be_3c3dd8fb60f8
  style 953005f6_d95f_6f12_9cd1_92f1abf4cf75 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/new-york-v4/examples/dialog-close-button.tsx lines 15–50

export default function DialogCloseButton() {
  return (
    <Dialog>
      <DialogTrigger asChild>
        <Button variant="outline">Share</Button>
      </DialogTrigger>
      <DialogContent className="sm:max-w-md">
        <DialogHeader>
          <DialogTitle>Share link</DialogTitle>
          <DialogDescription>
            Anyone who has this link will be able to view this.
          </DialogDescription>
        </DialogHeader>
        <div className="flex items-center gap-2">
          <div className="grid flex-1 gap-2">
            <Label htmlFor="link" className="sr-only">
              Link
            </Label>
            <Input
              id="link"
              defaultValue="https://ui.shadcn.com/docs/installation"
              readOnly
            />
          </div>
        </div>
        <DialogFooter className="sm:justify-start">
          <DialogClose asChild>
            <Button type="button" variant="secondary">
              Close
            </Button>
          </DialogClose>
        </DialogFooter>
      </DialogContent>
    </Dialog>
  )
}

Subdomains

Frequently Asked Questions

What does DialogCloseButton() do?
DialogCloseButton() is a function in the ui codebase, defined in apps/v4/registry/new-york-v4/examples/dialog-close-button.tsx.
Where is DialogCloseButton() defined?
DialogCloseButton() is defined in apps/v4/registry/new-york-v4/examples/dialog-close-button.tsx at line 15.

Analyze Your Own Codebase

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

Try Supermodel Free