Neovictorian Paisley Menswear

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

    4.0.3 • Public • Published

    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

    Prop Type Description Default
    container DOM Node Sets 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')
    children node The children will be rendered inside of the portaled container.

    Keywords

    none

    Install

    npm i @leafygreen-ui/portal

    DownloadsWeekly Downloads

    7,390

    Version

    4.0.3

    License

    Apache-2.0

    Unpacked Size

    66.6 kB

    Total Files

    17

    Last publish

    Collaborators

    • shaneeza
    • hswolff
    • dave.mccarthy
    • thesonofthomp