Capítulo 39 de 43
Renders a React subtree into a different part of the DOM (by default document.body) — the low-level mechanism every overlay primitive (Dialog, Popover, DropdownMenu, Tooltip, etc.) uses to escape parent stacking-context/overflow constraints.
container prop: choose a target DOM element other than document.body (e.g. a specific app root, or a shadow-DOM host).Portal.Root — wrap anything you want rendered outside its logical React-tree position in the DOM.Content in a Portal internally, exposed as that component's own Portal part.Portal primitive when building your own overlay-style component that needs the same DOM-escape behavior.container when the default document.body target doesn't work for your app's DOM structure (e.g. rendering inside a specific modal-root div, or into a web component's shadow root).Portal part built on this utility.