DialogContent() — ui Function Reference
Architecture documentation for the DialogContent() function in dialog.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 3d21707a_3eda_91eb_6ab1_9647b355f33d["DialogContent()"] d7454325_b46e_fdeb_ce12_716580da8f77["dialog.tsx"] 3d21707a_3eda_91eb_6ab1_9647b355f33d -->|defined in| d7454325_b46e_fdeb_ce12_716580da8f77 style 3d21707a_3eda_91eb_6ab1_9647b355f33d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/examples/base/ui-rtl/dialog.tsx lines 41–79
function DialogContent({
className,
children,
showCloseButton = true,
...props
}: DialogPrimitive.Popup.Props & {
showCloseButton?: boolean
}) {
return (
<DialogPortal>
<DialogOverlay />
<DialogPrimitive.Popup
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"
render={
<Button
variant="ghost"
className="absolute end-2 top-2"
size="icon-sm"
/>
}
>
<XIcon />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
)}
</DialogPrimitive.Popup>
</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/base/ui-rtl/dialog.tsx.
Where is DialogContent() defined?
DialogContent() is defined in apps/v4/examples/base/ui-rtl/dialog.tsx at line 41.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free