Dialog

A window that appears on top of the main window or another dialog, disabling interaction with the background content.

@radix-ui/react-dialog lucide-react

Installation


1

Install the following dependencies:

npx shadcn@latest add https://sbthemes.com/r/dialog.json

Examples


Custom close button


API Reference

Root

Root component that controls all the parts of a dialog.

PropTypeDefault
modalbooleantrue
defaultOpenboolean-
openboolean-
onOpenChangefunction-

Trigger

A button that opens the dialog.

PropTypeDefault
asChildbooleanfalse
Data attributeValues
[data-state]open / closed