2.0.0 • Published 6 years ago

react-fade-opacity v2.0.0

Weekly downloads
93
License
MIT
Repository
github
Last release
6 years ago

react-fade-opacity

React.js fade out/in opacity effect

npm

Install

$ npm install --save react-fade-opacity

Demo

Try it out !

Usage

import Fade from 'react-fade-opacity'

render() {
  <Fade>
    <button>Hello</button>
  </Fade>
}

API

Props

  static propTypes = {
    in: PropTypes.bool,
    interval: PropTypes.number,
    delay: PropTypes.number,
    children: PropTypes.node
  }
  static defaultProps = {
    in: false,
    interval: 50,
    delay: 6000
  }
PropertyDescription
inSet true to fade the animation in
intervalAnimation fade duration in ms
delayTime before the animation will show in ms
onFadeCompletecallback when animation completes