You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@leafygreen-ui/portal

Package Overview
Dependencies
Maintainers
6
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/portal

LeafyGreen UI Kit Portal

6.0.6
Source
npmnpm
Version published
Weekly downloads
48K
6.74%
Maintainers
6
Weekly downloads
 
Created
Source

Portal

npm (scoped)

View on MongoDB.design

Installation

Yarn

yarn add @leafygreen-ui/portal

NPM

npm install @leafygreen-ui/portal

Example

import Portal from '@leafygreen-ui/portal';

<Portal>
  <div>
    Portals transport their children to a div that is appended to the end of the
    document.body to or a node that can be specified with a container prop.
  </div>
</Portal>;

Output HTML

<div>
  <div class="leafygreen-ui-xi606m">
    Portals transport their children to a div that is appended to the end of the
    document.body to or a node that can be specified with a container prop.
  </div>
</div>

Properties

PropTypeDescriptionDefault
containerDOM NodeSets the container node, which will contain all of the portaled content. If no container is supplied, a div will be created and apened to the end of the document.body.document.createElement('div')
childrennodeThe children will be rendered inside of the portaled container.

FAQs

Package last updated on 22 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts