← All Components

Dialog

Modal dialog with header, body, footer, and overlay. Built on Radix Dialog.

Basic

Sizes

Use Case: Password Reset

Sub-components

ComponentDescription
DialogRoot provider (controls open/close state)
Dialog.TriggerElement that opens the dialog
Dialog.ContentThe modal panel (accepts size, overlay props)
Dialog.HeaderTop bar with close button
Dialog.BodyScrollable content area
Dialog.DescriptionAccessible description text
Dialog.FooterBottom bar for actions

Content Props

PropTypeDescription
size"sm" | "md" | "lg" | "xl" | "full"Maximum width of the dialog
overlay{ variant?: 'default' | 'none' }Configure or hide the backdrop overlay
classNamestringAdditional classes on the dialog content

Usage

<Dialog> <Dialog.Trigger asChild> <Button>Open</Button> </Dialog.Trigger> <Dialog.Content size="sm"> <Dialog.Header> <span className="font-head">Title</span> </Dialog.Header> <Dialog.Body> <Dialog.Description>Body text here.</Dialog.Description> </Dialog.Body> <Dialog.Footer> <Button size="sm">Confirm</Button> </Dialog.Footer> </Dialog.Content> </Dialog>