Alert dialogs are meant to interrupt the user with a critical message, so use 'em only when it's absolutely necessary. The fix? Set the role to alertdialog, and you're golden.
Loading...
Notice how the modal is dismissable and the close button is hidden? That's 'cause the role is set to alertdialog.
<ModalOverlay isDismissable={false}/>
Controlled
You can control the modal programmatically.
Loading...
Sizes
The modal is set to lg by default. You can adjust it to any size from the available options.
Loading...
Blur
If you want to blur the background, you can use isBlurred prop.
Loading...
Sticky
You can use the Modal.Body component to make the modal sticky.
Loading...
Nested
You can also nest modals. Try open it and confirm!
Loading...
Header
This setup’s super flexible. If you skip adding ModalTitle and just drop a string as its child, it'll auto-render as the title. Like this:
<Modal.Header> Title</Modal.Header>
Wanna customize more? Throw in props like title and description for a tailored header: