| backdrop | true | boolean, 'static' |
Apply a backdrop on body while modal is open. 'static' keeps the modal open on a backdrop click and bounces it instead. |
| className | - | string |
A string of all className you want applied to the base component. |
| dark6.0.0+ | - | boolean |
Flip the modal to the dark color mode, whatever the page around it uses. |
| defaultShow6.0.0+ | - | boolean |
The initial open state of an uncontrolled modal — read once on mount. |
| fullscreen | - | boolean, 'sm', 'md', 'lg', 'xl', '2xl' |
Set modal to covers the entire user viewport. |
| keyboard | true | boolean |
Closes the modal when escape key is pressed. |
| modal6.0.0+ | true | boolean |
Open the dialog modally, taking over the page. Set it to false for a dialog that leaves the rest of the page interactive. |
| onClose | - | (() => void) |
Callback fired once the component has closed. |
| onClosePrevented | - | (() => void) |
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. |
| onShow | - | (() => void) |
Callback fired when the component requests to be shown. |
| onShowChange6.0.0+ | - | ((show: boolean) => void) |
Callback fired when the modal requests an open-state change — a dismiss gesture (Escape, backdrop click) or, in uncontrolled mode, any internal toggle. In controlled mode update show yourself, or the modal stays as it is. |
| scrollable | - | boolean |
Create a scrollable modal that allows scrolling the modal body. |
| show6.0.0+ | - | boolean |
Control the open state. When set, the modal renders what show says and dismiss gestures only call onShowChange — nothing closes until the parent flips the prop. |
| size | - | 'sm', 'lg', 'xl' |
Size the component small, large, or extra large. |
| transition | true | boolean |
Remove animation to create modal that simply appear rather than fade in to view. |
| unmountOnClose | true | boolean |
By default the component is unmounted after close animation, if you want to keep the component mounted set this property to false. |
| visibleDeprecated 6.0.0 | - | boolean |
Toggle the visibility of modal component. Use defaultShow / show / onShowChange instead — visible is ignored when either of them is set. |