portal

A React feature, createPortal, that renders a component's children into a different place in the DOM, usually document.body.

In more detail

Portals let overlays escape parents that clip them with overflow: hidden or trap them in a stacking context. The portaled content still belongs to the same React tree, so context values and event bubbling work as if it had stayed in place.

Example

createPortal(<aside>{children}</aside>, document.body)

Related terms

Taught in

References