1.0.11 • Published 2 years ago

react-easy-scroll-effect v1.0.11

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

react-easy-scroll-effect

ReactJs Download Count GitHub license

Easy Scroll Element Effect Component for ReactJS

  • Just Two Elements will be used. (for element scroll effect)
  • Support GPU Render, by default.
  • Support SSR. ( server-side-rendering )

Live demo

demo gif

live demo link

Install

// npm
npm install --save react-easy-scroll-effect

// yarn
yarn add react-easy-scroll-effect

Usage

example 1
import { ScrollEffect } from 'react-easy-scroll-effect'
import 'react-easy-scroll-effect/dist/index.css'

const App = () => {
  return (
    <div>
    
        <ScrollEffect>
          <h1> some text here</h1>
        </ScrollEffect>

    </div>
  );
}
example 2 (with options)
import { ScrollEffect } from 'react-easy-scroll-effect'
import 'react-easy-scroll-effect/dist/index.css'

const App = () => {
  return (
    <div>

        <ScrollEffect offset={200} duration={2} animateOut={true}>
          <h1> some text here</h1>
        </ScrollEffect>

    </div>
  );
}

If You want to see more detail source,

Props

NameTypeRequiredDescriptionDefault
idNumber or StringOptionalIn NextJs : Must be use 'id' otherwise can not use "ScrollEffect" multiple time
offsetNumberOptionalThe "viewport" is from the top and bottom of the screen Width0 pixels
durationNumberOptionalAnimation duration in seconds.1 second
animateOutBooleanOptionalAnimation out stopfalse

License

MIT © shafayatC

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago