Trigger or anchor whose owner document receives the portal; optional when container is set
container
Element | null
Mount node; defaults to the owner document body. Resolves the document when element is omitted
Server render and missing anchor: renders nothing. Re-targets when element or container changes.
Props
Name
Type
Default
Description
children
ReactNode
—
Content rendered into the owner document mount node.
container
Element | null
—
Mount node. Defaults to the container of the nearest OverlayContainerProvider, then to the owner document's
body. A container passed here wins over the provider's; null counts as not passed. Also resolves the
document when element is omitted.
element
Element | null
—
Trigger or anchor whose owner document receives the portal; optional when container is set.
Storybook
Interactive examples and edge cases for this component are in Storybook.