Socket
Socket
Sign inDemoInstall

react-hover-component

Package Overview
Dependencies
8
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-hover-component

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


Version published
Maintainers
1
Install size
12.6 kB
Created

Readme

Source

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.

FAQs

Last updated on 02 Nov 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc