| alignment | - | 'top', 'center', undefined |
Align the modal in the center or top of the screen. |
| backdrop | true | boolean, 'static', undefined |
Apply a backdrop on body while modal is open. |
| className | - | string, undefined |
A string of all className you want applied to the base component. |
| container5.3.0+ | - | Element, DocumentFragment, (() => Element | DocumentFragment | null), null, undefined |
Appends the react modal to a specific element. You can pass an HTML element or function that returns a single element. By default document.body. |
| focus4.10.0+ | true | boolean, undefined |
Puts the focus on the modal when shown. |
| fullscreen | - | boolean, 'sm', 'md', 'lg', 'xl', 'xxl', undefined |
Set modal to covers the entire user viewport. |
| keyboard | true | boolean, undefined |
Closes the modal when escape key is pressed. |
| onClose | - | (() => void), undefined |
Callback fired when the component requests to be closed. |
| onClosePrevented | - | (() => void), undefined |
Callback fired when the component requests to be closed. |
| onShow | - | (() => void), undefined |
Callback fired when the modal is shown, its backdrop is static and a click outside the modal or an escape key press is performed with the keyboard option set to false. |
| portal | true | boolean, undefined |
Generates modal using createPortal. |
| scrollable | - | boolean, undefined |
Create a scrollable modal that allows scrolling the modal body. |
| size | - | 'sm', 'lg', 'xl', undefined |
Size the component small, large, or extra large. |
| transition | true | boolean, undefined |
Remove animation to create modal that simply appear rather than fade in to view. |
| unmountOnClose | true | boolean, undefined |
By default the component is unmounted after close animation, if you want to keep the component mounted set this property to false. |
| visible | - | boolean, undefined |
Toggle the visibility of modal component. |