bit Bheadless

Portal

Renders children into a different part of the DOM tree.

Implementation: CSS Tailwind

Basic Portal

Toggle the portal. When enabled, the content escapes to the portal outlet.

This box has overflow: hidden.

I'm portalled content!

✓ I'm rendered at the end of <body>, escaping the overflow box.

Tooltip escaping stacking context

The portal moves the tooltip to body level so it's always visible.

This container has overflow: hidden and z-index: 1.

Hover me for a tooltip

Portal Group (shared target)

BitBhPortalGroup directs nested portals into a shared container.

Portal Group target container (portals land here):

Disabled portal (render in place)

Enabled="false" renders in the natural position.

Container with overflow: hidden.

Rendered in place.

An unhandled error has occurred. Reload ๐Ÿ—™