modal
v4.9.10arrow_drop_downCallback fired when the component requests to be closed.
Modal is a lower-level construct that is leveraged by the following components:
If you are creating a modal dialog, you probably want to use the Dialog component rather than directly using Modal.
This component shares many concepts with react-overlays. Demos:
API:
Name | Type | Description |
---|---|---|
BackdropComponent | elementType | A backdrop component. This prop enables custom backdrop rendering. |
BackdropProps | object | Props applied to the |
children | custom | A single child content element. |
closeAfterTransition | bool | When set to true the Modal waits until a nested Transition is completed before closing. |
container | object | function | A node, component instance, or function that returns either.
The |
disableAutoFocus | bool | If Generally this should never be set to |
disableBackdropClick | bool | If |
disableEnforceFocus | bool | If Generally this should never be set to |
disableEscapeKeyDown | bool | If |
disablePortal | bool | Disable the portal behavior. The children stay within it’s parent DOM hierarchy. |
disableRestoreFocus | bool | If |
disableScrollLock | bool | Disable the scroll lock behavior. |
hideBackdrop | bool | If |
keepMounted | bool | Always keep the children in the DOM. This prop can be useful in SEO situation or when you want to maximize the responsiveness of the Modal. |
manager | object | |
onBackdropClick | function | Callback fired when the backdrop is clicked. |
onClose | function | The event source of the callback. |
onEscapeKeyDown | function | Callback fired when the escape key is pressed,
|
onRendered | function | Callback fired once the children has been mounted into the This prop will be deprecated and removed in v5, the ref can be used instead. |
open (required) | bool | If |
invisible | bool | If |
open (required) | bool | If |
children (required) | element | A single child content element. |
disableAutoFocus | bool | If Generally this should never be set to |
disableEnforceFocus | bool | If Generally this should never be set to |
disableRestoreFocus | bool | If |
getDoc (required) | function | Return the document to consider. We use it to implement the restore focus between different browser documents. |
isEnabled (required) | function | Do we still want to enforce the focus? This prop helps nesting TrapFocus elements. |
open (required) | bool | If |