Renders children into a detached DOM node appended to document.body, escaping any parent stacking context.
document.body
A React portal rendering children outside the parent DOM tree
Useful for overlays, tooltips, and modals where z-index conflicts with parent elements would otherwise occur.
import { Portal } from '@consumidor-positivo/ts-utils/react';<Portal> <div className="tooltip">Tooltip content</div></Portal>// With custom ID to isolate multiple portal roots<Portal portalId="my-modal-root"> <Modal /></Portal> Copy
import { Portal } from '@consumidor-positivo/ts-utils/react';<Portal> <div className="tooltip">Tooltip content</div></Portal>// With custom ID to isolate multiple portal roots<Portal portalId="my-modal-root"> <Modal /></Portal>
Renders children into a detached DOM node appended to
document.body, escaping any parent stacking context.