number
options.viewFactor
specifies what portion of an element must be within the viewport for it to be considered visible.
{ viewFactor: 0 }
Be careful using this option with really tall elements! Instead, see if you can achieve your desired effect using options.viewOffset
/**
* These elements will reveal the moment
* the first pixel is within the viewport.
*/
ScrollReveal().reveal('.any', { viewFactor: 0 });
/**
* These elements only reveals once 50%
* of them are within the viewport.
*/
ScrollReveal().reveal('.some', { viewFactor: 0.5 });
/**
* These elements reveals after they
* are completely within the viewport.
*/
ScrollReveal().reveal('.all', { viewFactor: 1.0 });