Modal
The Modal
component is used to render a structured container for modal windows.
Usage
Demonstration
Props
visible
visible
TYPE | DEFAULT VALUE |
---|---|
| Required |
Use this property to show/hide the Modal.
width
width
TYPE | DEFAULT VALUE |
---|---|
|
|
Use this property to assign a dynamic width to the modal.
If a function is set, the data coming from Viewport will be passed to it.
If a number is set or returned from the function, px
will automatically be added to it.
padding
padding
TYPE | DEFAULT VALUE |
---|---|
|
|
The inner padding of the modal.
If a function is set, the data coming from Viewport will be passed to it.
If a number is set or returned from the function, px
will automatically be added to it.
onClose
onClose
TYPE | DEFAULT VALUE |
---|---|
| None |
This callback is called when the ESC
key is pressed or the user clicks outside of the modal container.
onClosed
onClosed
TYPE | DEFAULT VALUE |
---|---|
| None |
This callback is called after the closing transition has completed and the content has been unmounted.
closeButton
closeButton
TYPE | DEFAULT VALUE |
---|---|
|
|
Whether or not to display a close button.
Last updated