π¨ Animation-scroll.js π is a javascript library that features scroll functionality with modern animation.
- π Demo
- π Description
- π¦ Installation
βΆοΈ Getting started- β Support for
- β¨ Contributors
- π License
Preview live Click Here
Under the hood, animation-scroll.js uses javascript, but also provides compatibility with a wide range of other libraries, such as Eg ReactJs, Vuejs, Angular, which allows the easy use of countless third-party add-ons that are available!
To start using animation-scroll.js, you must install it with the npm or yarn package manager, as shown in the next section, or download it directly!
// To install using npm
npm install animation-scroll.js -S
// To install using yarn
yarn add animation-scroll.js
Or you could also use it using a cdn provided by unpkg.com, as shown below!
<script src="https://unpkg.com/animation-scroll.js@1.0.12/dist/index.js"></script>
To use the beautiful animation animation-scroll.js is very simple, first we will import the index.js file that contains the code. Example:
// If you use ES5-
const animationScrollJs = require("animation-scroll.js");
// If you use ES6+ or Typescript
import animationScrollJs from "animation-scroll.js";
As you can see, we already import correctly! Animation-scroll.js, for example:
/**
* @Param container: number | element
* @Param duration: number
* @Param callback: function
* */
new AnimationScrollJs(500, 1000, (e) => {
console.log('Scroll done!');
});
Tambien puedes ejecutar el scroll sobre un contenedor perzonalizado
/**
* @Param container: number | element
* @Param duration: number
* @Param callback: function
* */
let container = document.getElementById('chat-container');
let duration = 1000;
var callback = function () {
console.log('Scroll done!');
}
new AnimationScrollJs(container, duration, callback);
Animation-scroll.js is an open source project licensed by MIT. You can grow thanks to the sponsors and the support of the amazing sponsors. If you want to join them, contact me here.
- Author Yoni Calsin
- Twitter Yoni Calsin
Thanks goes to these wonderful people (emoji key):
Yoni Calsin π» π§ π€ π¨ π |
This project follows the all-contributors specification. Contributions of any kind welcome!
Animation-scroll.js is MIT licensed.