Skip to content

Latest commit

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Scroll Motion

Small vanilla javascript library for x,y transforms while scrolling

Public URL

Figma Motion Exploration Demo:

Inspiration

Getting Started

<divclass="scroll-motion" data-speed-y="-2">
Vertical scroll slow
</div><divclass="scroll-motion" data-speed-y="7">
Vertical scroll fast
</div><divclass="rellax" data-speed-x="3">
Horizontal scroll
</div><scriptsrc="scroll-motion.js"></script><script>// Accepts any class namevarscrollMotion=newScrollMotion('.scroll-motion');</script>
<script>// Also can pass in optional settings blockletscrollMotion=newScrollMotion('.scroll-motion',{speedX: -2,speedY: 0,observe: 1,});scrollMotion();</script>

Prerequisites

Installing

To get Scroll Motion running on your local machine do the following steps.

  1. git clone https://github.com/whiteboxpub/scroll-motion.git
  2. cd scroll-motion

or

  1. npm install intersection-observer (polyfill)
  2. npm install scroll-motion

Built With

  • Vanilla JS

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Vanilla javascript scroll library for motion

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages