Install
yarn add react-prelodr --dev
npm install react-prelodr --save-dev
Usage
Component { // Get the wrapper component reference const pre = thisrefsmyRef // You can also get the Prelodr instance for access to API (optional) const PrelodrInstance = pre // Play pre } { console } { console } { return <div> <button onClick=thisonClick>Show Prelodr</button> <ReactPrelodr ref='myRef' prefixClass='prelodr' duration=800 onShown=thisonShown onHidden=thisonHidden /> </div> } ReactDOM
Check out Codepen Demo for more details.
CDN
The UMD and style files are also available on unpkg:
<!-- Prelodr Style --><!-- React-Prelodr Component -->
License
MIT license
© 2017 José Luis Quintana