3.0.0 • Published 6 years ago

react-hover-component v3.0.0

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

ReactJS Hover Component

React component that FINALLY allows you to implement the CSS hover functionality.

Install and usage

  1. npm install react-hover-component

  2. Example usage

import hover from 'react-hover-component'

...

    render(){
        return (
            <hover.div 
                style={{height: 100, 
                        width:100, 
                        backgroundColor: 'red',
                        transitionDuration: '1s'}}
                hover={{width:50}}>
                <div>
                    ...
                </div>
            </hover.div> 
        )
    }

...
  1. You can use hover.div, hover.text, hover.img... (more to come, feel free to contribute on Github

Props

  • style - OBJECT - object with styling properties. (Add the transitionDuration property to make the transition smoother). PS : The styles are applied to the child of the Hover component. The property is set to 0.3 seconds by default
  • hover - OBJECT - object with styling properties that will overite those in the base style property. No need to repeat styles declared in the style prop. Just provide the new styles to apply when hovering.
3.0.0

6 years ago

2.2.2

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.3

6 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago