Portal

Primitive #4

🔍 Problem it solves

A dropdown inside a modal gets cut off because the modal has overflow: hidden or a z-index stacking context that traps the dropdown. CSS cannot easily escape parent constraints.

✅ Solution

Renders content directly to <body> (or a custom portal root), completely escaping all parent CSS constraints like overflow, z‑index, and positioning. Preserves event bubbling.

🧩 Used by components

Dialog, Dropdown, Tooltip, Popover, Toast, Modal, HoverCard, Select, Combobox

🎮 Interactive demo