Installation

Browser Support

CSS Transition and CSS Transform are required by ScrollReveal to create animations. Luckily today, that means over 94% of browsers (globally) are supported.

CDN (Recommended)

You may find ScrollReveal on various content delivery networks, but unpkg always reflects the latest stable version, as soon as it’s published.

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

Make sure to include ScrollReveal in the <head> of your page; this is an essential step in creating the best User Experience.

In Production

Make sure to specify a fixed version of ScrollReveal, and use the minified distribution. This will ensure the best performance, and future changes don’t impact the functionality of your project.

<script src="https://unpkg.com/scrollreveal@4.0.0/dist/scrollreveal.min.js"></script>

If you’re unsure what version you have installed, you can access the version instance property.

Package

npm install scrollreveal --save

Contributing

When making contributions, please make sure to work off of the development branch. This makes it safer and easier to incorporate your changes.

# First, fork the repository on GitHub

# Then...
git clone -b development "https://github.com/YOUR-USERNAME/scrollreveal.git"
cd scrollreveal
git checkout -b "your-new-branch-name"

If you have an idea for a new feature, please raise an issue to discuss it before sending code. In many cases features are absent for a reason.

Ideally, include a test that fails without your changes, but passes with them. Pull requests will only be merged once they pass CI.