1. Docs
  2. Components
  3. Dialog

Dialog

A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.

Installation

Anatomy

Examples

Scrollable

Alert Dialog

Use the role="alertdialog" prop on the <Dialog.Content> element to make an alert dialog. Also, make sure to set the isDismissable prop to false on the <Dialog.Overlay> or <Dialog.Modal> to prevent the dialog from being dismissed by clicking outside of it.

Sheet

Use the side prop on the <Dialog.Modal> element to make a sheet dialog.

Component dialog-sheet-demo not found in registry.

API Reference

Dialog.Root

PropTypeDefault
children
ReactNode
isOpen
boolean
defaultOpen
boolean
onOpenChange
function

Dialog.Overlay

PropTypeDefault
children
ReactNode
isBlurred
boolean
false
isDismissable
boolean
true
isKeyboardDismissDisabled
boolean
className
string

Dialog.Modal

PropTypeDefault
children
ReactNode
isDismissable
boolean
true
isKeyboardDismissDisabled
boolean
className
string

Dialog.Content

PropTypeDefault
children
ReactNode
role
enum
"dialog"
className
string

Dialog.Header

PropTypeDefault
children
ReactNode
className
string

Dialog.Title

PropTypeDefault
children
ReactNode
className
string

Dialog.Description

PropTypeDefault
children
ReactNode
className
string

Dialog.Footer

PropTypeDefault
children
ReactNode
className
string

Dialog.Close

PropTypeDefault
className
string