@consumidor-positivo/ts-utils - v1.34.0
    Preparing search index...

    Function Portal

    • Renders children into a detached DOM node appended to document.body, escaping any parent stacking context.

      Parameters

      • __namedParameters: PortalProps

      Returns ReactPortal

      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>