When a modal is active, you should notice the following:
role
of dialog
(or alertdialog
).
aria-label
or aria-labelledby
.
document.body
instead of its taking up its source-order position within the React component tree.
This modal
This modal
This modal
focusDialog=true
, so the focus trap
still works but no focus outline is initially visible
escapeExits=false
so the Escape key does not close the modal.
This modal's active/inactive state is controlled with the mounted
prop instead of
mounting and unmounting.
This modal uses some custom classes and special onEnter
and onExit
functions to enable nice transitions.
This modal renders into a specified element instead of into a new one at the bottom of <body>
, and uses the underlayStyle
prop to customize the underlay.
This modal renders with no default styles via
includeDefaultStyles=false
, allowing complete
presentational control without `underlayStyle` or `dialogStyle` overrides.
Demo includes styles to allow for an auto-overflowing modal with a
sticky footer.