@leafygreen-ui/portal v7.0.0
Portal
View on MongoDB.design
Installation
Yarn
yarn add @leafygreen-ui/portalNPM
npm install @leafygreen-ui/portalExample
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. |
8 months ago
11 months ago
11 months ago
9 months ago
11 months ago
8 months ago
9 months ago
6 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago