Socket
Socket
Sign inDemoInstall

@leafygreen-ui/portal

Package Overview
Dependencies
13
Maintainers
5
Versions
67
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @leafygreen-ui/portal

LeafyGreen UI Kit Portal


Version published
Weekly downloads
36K
increased by27.17%
Maintainers
5
Install size
2.10 MB
Created
Weekly downloads
 

Readme

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

Last updated on 26 Mar 2024

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc