Home / Function/ DialogContent() — ui Function Reference

DialogContent() — ui Function Reference

Architecture documentation for the DialogContent() function in dialog.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  d122dbce_7dbc_4b1c_4e32_6ffa8afd523b["DialogContent()"]
  eb4130da_fbf4_72f5_b0aa_b046233c6a10["dialog.tsx"]
  d122dbce_7dbc_4b1c_4e32_6ffa8afd523b -->|defined in| eb4130da_fbf4_72f5_b0aa_b046233c6a10
  style d122dbce_7dbc_4b1c_4e32_6ffa8afd523b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/base/ui/dialog.tsx lines 39–83

function DialogContent({
  className,
  children,
  showCloseButton = true,
  ...props
}: DialogPrimitive.Popup.Props & {
  showCloseButton?: boolean
}) {
  return (
    <DialogPortal>
      <DialogOverlay />
      <DialogPrimitive.Popup
        data-slot="dialog-content"
        className={cn(
          "cn-dialog-content fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none",
          className
        )}
        {...props}
      >
        {children}
        {showCloseButton && (
          <DialogPrimitive.Close
            data-slot="dialog-close"
            render={
              <Button
                variant="ghost"
                className="cn-dialog-close"
                size="icon-sm"
              />
            }
          >
            <IconPlaceholder
              lucide="XIcon"
              tabler="IconX"
              hugeicons="Cancel01Icon"
              phosphor="XIcon"
              remixicon="RiCloseLine"
            />
            <span className="sr-only">Close</span>
          </DialogPrimitive.Close>
        )}
      </DialogPrimitive.Popup>
    </DialogPortal>
  )
}

Subdomains

Frequently Asked Questions

What does DialogContent() do?
DialogContent() is a function in the ui codebase, defined in apps/v4/registry/bases/base/ui/dialog.tsx.
Where is DialogContent() defined?
DialogContent() is defined in apps/v4/registry/bases/base/ui/dialog.tsx at line 39.

Analyze Your Own Codebase

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

Try Supermodel Free