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
  22f541b6_0a37_16fd_1203_43d7808c2674["DialogCloseButton()"]
  680995fa_e20e_c3fd_316e_ae7a65b9faa8["dialog-close-button.tsx"]
  22f541b6_0a37_16fd_1203_43d7808c2674 -->|defined in| 680995fa_e20e_c3fd_316e_ae7a65b9faa8
  style 22f541b6_0a37_16fd_1203_43d7808c2674 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/base/dialog-close-button.tsx lines 15–44

export function DialogCloseButton() {
  return (
    <Dialog>
      <DialogTrigger render={<Button variant="outline" />}>Share</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 render={<Button type="button" />}>Close</DialogClose>
        </DialogFooter>
      </DialogContent>
    </Dialog>
  )
}

Subdomains

Frequently Asked Questions

What does DialogCloseButton() do?
DialogCloseButton() is a function in the ui codebase, defined in apps/v4/examples/base/dialog-close-button.tsx.
Where is DialogCloseButton() defined?
DialogCloseButton() is defined in apps/v4/examples/base/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