Dialog

Centred modal for confirmations and short decisions. The backdrop darkens first, the panel rises with its title, message and actions, and on close it fades out in place.

Guide: How to make a modal in React Native →

Preview

Installation

npx
npx @lumioui/cli add dialog

Usage

import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogClose } from "@/components/ui/dialog/dialog";
<Dialog />

Also exported: DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogClose.

Examples

Confirm

"End workout?" on a live run.

API reference

Dialog

Prop Type Default
children* React.ReactNode —
open boolean

Controlled open state. Omit for uncontrolled usage with defaultOpen.

—
defaultOpen boolean

Uncontrolled initial open state. Default false.

false
onOpenChange (open: boolean) => void —

DialogContent

Prop Type Default
className string —
material "solid" | "glass"

Surface material. "solid" (default) is the opaque popover surface, legible in light and dark over any screen. "glass" opts into liquid glass; use it only when the dialog floats over photos or video.

"solid"

DialogClose

Prop Type Default
children* React.ReactElement<DialogCloseChildProps> —
className string —