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

0.0.1-alpha.3 • Public • Published

@rendr-view/portal

A wrapper around React.createPortal.

Installation

yarn add @rendr-view/portal

Props

export interface Props {
  children: React.ReactNode;
  className?: string;
  el?: string;
  id?: string;
}

children

The content to render inside the portal.

className

Optional className to be given to the portal container element. By default this is root-portal.

el

The HTML element of the portal container. By default this is div.

id

An ID to be given to the portal container. If a portal has an ID, any existing instance of a portal container with the same id will be replaced.

Readme

Keywords

none

Package Sidebar

Install

npm i @rendr-view/portal

Weekly Downloads

20

Version

0.0.1-alpha.3

License

MIT

Unpacked Size

10.9 kB

Total Files

14

Last publish

Collaborators

  • fiveid