@rational/portal
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.3 • Public • Published

Portal

The Portal component is a declarative way to use createPortal in React, which allows you to render a component into a DOM node that exists outside the DOM hierarchy of the parent component.

Features

  • Next.js Support: The Portal component works with Next.js appDir and React Server Component out of the box. No rehydration issues.

Installation

npm install @rational/portal
pnpm add @rational/portal
yarn add @rational/portal

Usage

import { Portal } from '@rational/portal';

<Portal>
  <div>Portal content</div>
</Portal>;

Readme

Keywords

Package Sidebar

Install

npm i @rational/portal

Weekly Downloads

3

Version

1.0.0-beta.3

License

MIT

Unpacked Size

2.69 kB

Total Files

7

Last publish

Collaborators

  • cryrivers