Atelier UI

Search components…

Search components…

Modal Dialog

Modal built on native <dialog> with enter / exit animation, focus handling and backdrop dismiss.

Edit in sandbox

Copy a prompt for your AI coding tool with the source, dependencies and usage

Props

ModalDialogProps

Also accepts all props of Omit<React.ComponentProps<"dialog">, "open" | "title">

PropTypeDefaultDescription
open* requiredboolean——
onOpenChange* required(open: boolean) => void——
title* requiredReact.ReactNode——
descriptionReact.ReactNode——
footerReact.ReactNode—Buttons along the bottom edge
size"sm" | "md" | "lg""md"—
dismissiblebooleantrueClicking the dimmed backdrop closes the dialog
showClosebooleantrue—

Install

$ npx shadcn@latest add https://chromotion.dev/r/modal-dialog.json

The CLI installs the base component; your customizations live in the code generated on the Customize tab.

More like this