Installation
npx shadcn@latest add @iconiq/dialogProps
Dialog
4 props
Dialog, DialogTrigger, DialogClose, and DialogPortal are direct re-exports of the matching Radix dialog primitives.
open
booleanControlled open state on the Dialog root when you want the parent component to own visibility.
defaultOpen
booleanUncontrolled initial state forwarded to Radix Dialog.Root.
onOpenChange
(open: boolean) => voidCalled whenever Radix requests a state change through triggers, overlay clicks, or escape key handling.
children
ReactNodeRequired
Composition surface for the trigger, content, and any related dialog helpers.
Notes
Any remaining Dialog.Root props continue to work because the root export is the Radix primitive itself.
Accessibility and focus-trap behavior come from Radix rather than additional wrapper logic here.
DialogContent
3 props
Motion-enhanced content wrapper built around DialogPrimitive.Content and AnimatePresence.
open
booleanControls whether the animated portal branch renders at all. In practice this must mirror the root open state for the content to appear and exit correctly.
className
stringMerged onto the inner motion panel rather than the full-screen DialogPrimitive.Content wrapper.
children
ReactNodeRequired
Content rendered inside the animated panel. Each direct child is wrapped in its own motion.div for staggered entry.
Notes
Accessibility props and Radix callbacks such as onEscapeKeyDown, onPointerDownOutside, aria-describedby, and aria-labelledby are forwarded to DialogPrimitive.Content.
DialogContent always renders its own close button in the top-right corner using DialogPrimitive.Close and the Lucide X icon.
DialogTrigger and DialogClose
2 props
These exports are direct Radix aliases used to open or close the dialog from any custom element.
asChild
booleanLets you turn a custom button or link into the trigger or close control without adding an extra wrapper element.
children
ReactNodeRequired
Interactive content rendered by the trigger or close primitive.
Notes
Because both exports come directly from Radix, they also accept the remaining primitive props for event handling and accessibility wiring.
DialogHeader and DialogFooter
2 props
Layout helpers used to structure dialog content without changing dialog behavior.
children
ReactNodeRequired
Content rendered inside the helper container.
className
stringMerged onto the helper wrapper so spacing and alignment can be adjusted per dialog.
Notes
Both helpers accept the normal div HTML attribute surface in addition to className and children.
DialogTitle and DialogDescription
2 props
Semantic text helpers that forward to the matching Radix title and description primitives.
children
ReactNodeRequired
Text or inline markup rendered inside the title or description primitive.
className
stringMerged with the default title or description styles.
Notes
Both helpers forward refs to the underlying Radix primitives.