A modal stack
A new modal hides the one below it until it closes.
open modals: 0Modals you can await.
A headless, zero-dependency modal stack for React. Open a modal like you call a function, and get its answer back.
Start with Getting started, or read the source on GitHub (opens in a new tab) and the package on npm (opens in a new tab).
Run it: the modal opens, and the promise waits for its answer.
Install. One package, no dependencies besides React.
Add the provider. It renders the stack at the root of your app.
Open a modal. Any component works. Its close value is the result.
A new modal hides the one below it until it closes.
open modals: 0Open a modal inside a modal, and close any level of the chain.
Keep a modal open until the user is ready to leave.
Play the exit animation first, then unmount.
promises resolved after the animation: 0Load a modal’s code only when it opens.
Add a Modal built on your Dialog. The registry serves the Radix or Base UI version to match the style in your components.json.
Install react-easy-modals, add the provider and open your first modal.
The modal stack, opening and closing modals, and the props each modal receives.
The props every modal component receives.
Animate a modal out before it unmounts with useBeforeClose.
Load modal components on demand with dynamic imports.
Open modals inside other modals and close any level of the chain.
A ready-made shadcn/ui Modal built on Dialog, for Radix or Base UI.
The provider that renders the modal stack, its backdrop and its loading state.
Open and close modals, and read the current stack.
Read the current modal's props from any child component.
Reach a parent or the root modal from inside a nested modal.
Block or delay a modal's close, for confirmations and exit animations.