Intersy.js

A simple, lightweight library of CSS effects that are triggered when element enters the viewport as the user scrolls the page.

Intersy useses Intersection and Mutation Observers. It automatically adds "in-view" class to each element with "intersy" class currently present in viewport.

It works well with "reactive" frameworks where the content is loaded dynamically (Vue, React, LiveWire etc.).

See project on GitHub.

Usage:

  1. Include Intersy script anywhere in your HTML:
  2. <script src="https://cdn.jsdelivr.net/gh/pronode/intersy@main/intersy.js"></script>
  3. Add CSS with pre-defined effects:
  4. <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/pronode/intersy@main/intersy.css" />
  5. Add one ore more Intersy classes to the element you want to animate:
  6. <div class="intersy fade-in"> yey! </div>
  7. That's it!

Extra:

Effects (classes):

fade-in
fade-in slow
fade-in slow delay-250
appear-from-left
appear-from-right
appear-from-top
appear-from-bottom
stretch-left fade-in
stretch-right once
stretch-top
stretch-bottom fade-in
rotate-y fade-in
rotate-x fade-in
shrink fade-in
grow
grow fade-in
bounce
pulse
slide-from-left
slide-from-right
slide-from-top fade-in
slide-from-bottom fade-in
slide-left-then-grow
slide-right-then-grow
book-page fade-in
Define your own! :)