scrollreveal README

The project's README from github.com/jlmakes/scrollreveal. As one markdown file: README.md.

ScrollReveal


ScrollReveal

Animate elements as they scroll into view.

Build status Monthly downloads Version 5.7 kB min+gzip GPLv3 License


Installation

Browser

A simple and fast way to get started is to include this script on your page:

<script src="https://unpkg.com/scrollreveal"></script>

This will create the global variable ScrollReveal

Be careful using this method in production. Without specifying a fixed version number, Unpkg may delay your page load while it resolves the latest version. Learn more at unpkg.com

Module

$ npm install scrollreveal

CommonJS

const ScrollReveal = require('scrollreveal')

ES2015

import ScrollReveal from 'scrollreveal'

Usage

Installation provides us with the constructor function ScrollReveal(). Calling this function returns the ScrollReveal instance, the “brain” behind the magic.

ScrollReveal employs the singleton pattern; no matter how many times the constructor is called, it will always return the same instance. This means we can call it anywhere, worry-free.

There’s a lot we can do with this instance, but most of the time we’ll be using the reveal() method to create animation. Fundamentally, this is how to use ScrollReveal:

<h1 class="headline">
	Widget Inc.
</h1>
ScrollReveal().reveal('.headline')

🔎 See this demo live on JSBin



The full documentation can be found at https://scrollrevealjs.org

If you’re using an older version of ScrollReveal, you can find legacy documentation in the wiki



Commercial License Badge

License

For commercial sites, themes, projects, and applications, keep your source code private/proprietary by purchasing a Commercial License.

Licensed under the GNU General Public License 3.0 for compatible open source projects and non-commercial use.


Copyright 2023 Fisssion LLC

scrollreveal (jlmakes/scrollreveal)

scroll
Searching Database…

What is this?ScrollReveal is a JavaScript library that animates elements on a web page as they scroll into view.
Is it a standalone app or something I add to my own page's code?It's a small JavaScript library you include in your web page — either via a script tag or as a module — not a standalone application.
How do I add it to a page?Include the script from unpkg, which creates a global ScrollReveal variable, or install it via npm and import it as a CommonJS or ES2015 module.
Is the script-tag method safe to use in production?Be careful with it: without a fixed version number, unpkg may delay your page load while it resolves the latest version, so pin a specific version in production.
Can I use it on a commercial site without paying?Not if you want to keep your code proprietary: commercial sites need a paid Commercial License. Open source projects and non-commercial use are covered by GPLv3 for free.
Does calling ScrollReveal() more than once create extra instances?No. ScrollReveal uses the singleton pattern — no matter how many times the constructor is called, it always returns the same instance, so you can call it anywhere without conflicts.
What are the animations built on?They rely on CSS transforms and transitions. Internally the library ships with tiny helper dependencies: rematrix, tealight and miniraf.
Is the project still alive?It's been around since 2014, has over 22k GitHub stars, and is not archived; the README copyright is 2023 by Fisssion LLC.
What are similar projects?GSAP, lax.js, isotope, motion, iscroll, toastr, headroom.js, anime
Creator
jlmakes
Size
1.1 MB
Stars
22.5K
Updated
CommitMar 18
Age
12y
Commits · 90 Days