Name: fader
Owner: Legitcode
Description: a HOC that will fade a component in and out
Created: 2015-09-22 01:04:17.0
Updated: 2016-12-06 12:55:01.0
Pushed: 2016-06-09 17:43:20.0
Homepage: http://legitcode.github.io/fader/
Size: 568
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Fade a component in for x amount of seconds, then make it disappear, and completely hide (return null) until you choose to fade it again.
npm install fader
en you set this.state.fade to true, it's triggered
er fade={this.state.fade} time={2}>
iv style={{background: 'black', color: 'white'}}>
Fading in and out! For two seconds!
div>
der>
The child component can be anything.
time
in seconds, total time of the fadefade
every time it's set to true, it triggers a fade in and out