Portal

Renders children to a dedicated root outside the parent DOM tree. Used by every overlay primitive.

Foundation@sisyphos-ui/portalView on npm

Preview

tsx

Children below are rendered into a Portal attached to document.body. Open the element inspector to see them outside this section.

Installation

Install the individual package:

snippet.bashbash
pnpm add @sisyphos-ui/portal @sisyphos-ui/core

Or use the umbrella package that bundles everything:

snippet.bashbash
pnpm add @sisyphos-ui/ui

Usage

Import the component styles and the component itself:

snippet.tsxtsx
import "@sisyphos-ui/portal/styles.css";
import { Portal } from "@sisyphos-ui/portal";

API

Props table is being written. See the package README for the complete API surface.

The full API including refs, ARIA attributes, and HTML passthroughs lives in the package README.