1.0.3 • Published 9 years ago
react-portal-lite v1.0.3
React-Portal (lite)
A lightweight component that transports HTML elements to the end of document.body.
Installation
$ npm install --save react-portal-liteBasic Usage
<Transport isOpen>
<h1>Hello World</h1>
</Transport>
// The H1 element will be appended to the end of document.bodyAPI
| 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. |