Props
Attributes
- Graph
-
- Supertypes
-
trait WithChildren[Any]trait PropTypesclass Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
A backdrop component. This prop enables custom backdrop rendering.
A backdrop component. This prop enables custom backdrop rendering.
Attributes
A single child content element.
A single child content element.
Attributes
Override or extend the styles applied to the component.
Override or extend the styles applied to the component.
Attributes
When set to true the Modal waits until a nested Transition is completed before closing.
When set to true the Modal waits until a nested Transition is completed before closing.
Attributes
The component used for the root node. Either a string to use a HTML element or a component.
The component used for the root node. Either a string to use a HTML element or a component.
Attributes
The components used for each slot inside.
The components used for each slot inside.
This prop is an alias for the slots
prop. It's recommended to use the slots
prop instead.
Attributes
The extra props for the slot components. You can override the existing props or add new ones.
The extra props for the slot components. You can override the existing props or add new ones.
This prop is an alias for the slotProps
prop. It's recommended to use the slotProps
prop instead, as componentsProps
will be deprecated in the future.
Attributes
An HTML element or function that returns one. The container
will have the portal children appended to it.
An HTML element or function that returns one. The container
will have the portal children appended to it.
You can also provide a callback, which is called in a React layout effect. This lets you set the container from a ref, and also makes server-side rendering possible.
By default, it uses the body of the top-level document object, so it's simply document.body
most of the time.
Attributes
If true
, the modal will not automatically shift focus to itself when it opens, and replace it to the last focused element when it closes. This also works correctly with any modal children that have the disableAutoFocus
prop.
If true
, the modal will not automatically shift focus to itself when it opens, and replace it to the last focused element when it closes. This also works correctly with any modal children that have the disableAutoFocus
prop.
Generally this should never be set to true
as it makes the modal less accessible to assistive technologies, like screen readers.
Attributes
If true
, the modal will not prevent focus from leaving the modal while open.
If true
, the modal will not prevent focus from leaving the modal while open.
Generally this should never be set to true
as it makes the modal less accessible to assistive technologies, like screen readers.
Attributes
If true
, hitting escape will not fire the onClose
callback.
If true
, hitting escape will not fire the onClose
callback.
Attributes
The children
will be under the DOM hierarchy of the parent component.
The children
will be under the DOM hierarchy of the parent component.
Attributes
If true
, the modal will not restore focus to previously focused element once modal is hidden or unmounted.
If true
, the modal will not restore focus to previously focused element once modal is hidden or unmounted.
Attributes
Disable the scroll lock behavior.
Disable the scroll lock behavior.
Attributes
If true
, the backdrop is not rendered.
If true
, the backdrop is not rendered.
Attributes
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.
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.
Attributes
Callback fired when the component requests to be closed. The reason
parameter can optionally be used to control the response to onClose
.
Callback fired when the component requests to be closed. The reason
parameter can optionally be used to control the response to onClose
.
Value parameters
- {object}
-
event The event source of the callback.
- {string}
-
reason Can be:
"escapeKeyDown"
,"backdropClick"
.
Attributes
A function called when a transition enters.
A function called when a transition enters.
Attributes
A function called when a transition has exited.
A function called when a transition has exited.
Attributes
If true
, the component is shown.
If true
, the component is shown.
Attributes
The props used for each slot inside the Modal.
The props used for each slot inside the Modal.
Attributes
The components used for each slot inside the Modal. Either a string to use a HTML element or a component.
The components used for each slot inside the Modal. Either a string to use a HTML element or a component.
Attributes
The system prop that allows defining system overrides as well as additional CSS styles.
The system prop that allows defining system overrides as well as additional CSS styles.
Attributes
Deprecated methods
Props applied to the Backdrop
element.
Callback fired when the backdrop is clicked.
Callback fired when the backdrop is clicked.
Attributes
- Deprecated
- true
Inherited methods
Attributes
- Inherited from:
- PropTypes
Inherited fields
Attributes
- Inherited from:
- PropTypes