Portal

utilities

A utility component that renders its children into a different DOM node.

Preview

Portal

Renders children outside the DOM hierarchy into a target container (defaults to document.body).

Installation

npm install @launchapp/design-system
Import
import { Portal } from "@launchapp/design-system";

Examples

Portal Usage

<Portal>  <div className="fixed inset-0 bg-black/50 pointer-events-none" /></Portal>

Props

PropTypeDefaultDescription
container
HTMLElement | nullTarget DOM container. Defaults to document.body.
asChild
booleanfalseRender as child element.