DialogContent() — ui Function Reference
Architecture documentation for the DialogContent() function in dialog.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 53a783c9_0acc_f7e5_52c9_95df8a8923cd["DialogContent()"] cc7183e6_897f_99e2_27d9_e32a77989fc2["dialog.tsx"] 53a783c9_0acc_f7e5_52c9_95df8a8923cd -->|defined in| cc7183e6_897f_99e2_27d9_e32a77989fc2 style 53a783c9_0acc_f7e5_52c9_95df8a8923cd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/examples/radix/ui-rtl/dialog.tsx lines 49–84
function DialogContent({
className,
children,
showCloseButton = true,
...props
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
showCloseButton?: boolean
}) {
return (
<DialogPortal>
<DialogOverlay />
<DialogPrimitive.Content
data-slot="dialog-content"
className={cn(
"bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 fixed start-1/2 top-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-4 text-sm ring-1 duration-100 outline-none sm:max-w-sm rtl:translate-x-1/2",
className
)}
{...props}
>
{children}
{showCloseButton && (
<DialogPrimitive.Close data-slot="dialog-close" asChild>
<Button
variant="ghost"
className="absolute end-2 top-2"
size="icon-sm"
>
<XIcon />
<span className="sr-only">Close</span>
</Button>
</DialogPrimitive.Close>
)}
</DialogPrimitive.Content>
</DialogPortal>
)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does DialogContent() do?
DialogContent() is a function in the ui codebase, defined in apps/v4/examples/radix/ui-rtl/dialog.tsx.
Where is DialogContent() defined?
DialogContent() is defined in apps/v4/examples/radix/ui-rtl/dialog.tsx at line 49.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free