Portal

Noun · Development

Definitions

  1. A mechanism in React (and similar UI frameworks) that renders a child component into a DOM node outside its parent's hierarchy, while preserving the original React component tree for event bubbling and context. Commonly used for modals, tooltips, and dropdown menus that need to visually escape overflow or z-index constraints.

    In plain English: A way to make a UI element appear somewhere else on the page (like a popup outside its container) while still being logically connected to the component that created it.

    Example: "The dropdown renders through a portal to document.body so it isn't clipped by the sidebar's overflow: hidden."

Related Terms