Overrides the default DOM element with a custom render function.
This allows rendering existing components with built-in styles and behaviors
such as router links, animation libraries, and pre-styled components.
Requirements:
You must render the expected element type (e.g. if <button> is expected, you cannot render an
<a>).
Only a single root DOM element can be rendered (no fragments).
You must pass through props and ref to the underlying DOM element, merging with your own prop
as appropriate.
When user interacts with the argument element outside of the overlay ref,
return true if onClose should be called. This gives you a chance to filter
out interaction with elements that should not dismiss the overlay.
By default, onClose will always be called on interaction outside the overlay ref.
Optionalslot
slot?:string|null
A slot name for the component. Slots allow the component to receive props from a parent
component. An explicit null value indicates that the local props completely override all
props received from a parent.
Optionalstyle
style?:CSSProperties
OptionalsuppressHydrationWarning
suppressHydrationWarning?:boolean
A React-only flag that suppresses the warning React normally logs when an element's
server-rendered content doesn't match the client render during hydration. See React
docs.
Optionaltranslate
translate?:"yes"|"no"
OptionalUNSTABLE_portalContainer
UNSTABLE_portalContainer?:Element
The container element in which the overlay portal will be placed. This may have unknown
behavior depending on where it is portalled to.
Deprecated
Use a parent UNSAFE_PortalProvider to set your portal container instead.
Props for the Dialog component.