Dialog
An overlay window that disables interaction with the underlying content, either over the primary window or another dialog.
Shadcn UI
This component is part of Shadcn UI with some modifications.
Preview
Usage
Lazy Load Content
To improve performance and reduce the size of the initial bundle use React Lazy to lazy load the dialog content. Use this if you have a large components inside the dialog.
Content
Your dialog content should be in a separate file, for example content.tsx
.
Hook State
We're created context to control dialog state open
and setOpen
. You can use it as hook inside dialog component.