New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

reactanimationonscreen

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reactanimationonscreen

React Animation On Screen is a custom hook to track if an element is on screen and apply some CSS to it.

npmnpm
Version
0.4.0
Version published
Weekly downloads
8
Maintainers
1
Weekly downloads
 
Created
Source

React Animation On Screen

React Animation On Screen is a custom React hook to check when an element is appearing on the screen and apply some animation to it.

Installation

npm install reactanimationonscreen

Usage

Initiate the function inside an useEffect passing the classname of the elements you want to apply the animation, your css classname with the animation to be applied, y offset amount to apply the animation and if you want to use a debounce function to improve performance.

import useOnScreen from "reactanimationonscreen";

useEffect(() => {
  const sections = useOnScreen("sectionDiv", "sectionAnimation", 0, true);
}, []);

FAQs

Package last updated on 28 Oct 2020

Did you know?

Socket

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