Skip to content

Legitcode/fader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Fader

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.

##Install

npm install fader

##Example

//when you set this.state.fade to true, it's triggered
<Fader fade={this.state.fade} time={2}>
  <div style={{background: 'black', color: 'white'}}>
    Fading in and out! For two seconds!
  </div>
</Fader>

The child component can be anything.

###Props

  • time in seconds, total time of the fade
  • fade every time it's set to true, it triggers a fade in and out

About

a HOC that will fade a component in and out

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published