react-portal-lite
v1.0.3
Published
Transport React elements to document.body
Downloads
4
Readme
React-Portal (lite)
A lightweight component that transports HTML elements to the end of document.body
.
Installation
$ npm install --save react-portal-lite
Basic Usage
<Transport isOpen>
<h1>Hello World</h1>
</Transport>
// The H1 element will be appended to the end of document.body
API
| Property | Description |
| -------- | ----------- |
| isOpen | Accepts a boolean. If true, the element will be removed from the normal HTML flow and appended to the end of document.body
. If false, nothing will render. |
| children | A single React element that will be appended to the end of document.body
. |