🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-onscroll-animate

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-onscroll-animate

react-onscroll-animate

0.0.6
latest
Source
npm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

react-onscroll-animate

GitHub package.json version MIT License

React components to animate elements on scroll based in pure scroll scroll percentage, this means that the animation will play from a range of scroll %

Installation

Install react-onscroll-animate

 npm install react-onscroll-animate --save

or

 yarn add react-onscroll-animate 

Most Simple Use:

import { Show, Fade } from 'react-onscroll-animate'

/* 
the animation is going to start when
the page has been scrolled 50%, 
and its gonna take another 50% of scroll to end 
*/
<Show {...{ startAndEnd: [50, 100] }}>
    <div>FadeIn effect from 50% to 100%</div>
</Show>

/* 
the animation is going to start when
the page has been scrolled 50%, 
and its gonna take another 10% of scroll to end 
*/
<Fade {...{ startAndEnd: [50, 60] }}>
    <div>FadeOut effecto from 50% to 60%</div>
</Fade>

To Do

  • Add usePagePercentage Hook
  • Add Translate X animation
  • Add Translate Y animation
  • Add Scale Y animation
  • Add Height animation
  • Add Width animation

Authors

  • @Nan0ck

Keywords

reactScrollEffects

FAQs

Package last updated on 13 Jun 2022

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