ScrollDir : Leverage Vertical Scroll Direction with CSS

Spread the love

ScrollDir, short for Scroll Direction, is a 0 dependency, ~1kb micro Javascript plugin to easily leverage vertical scroll direction in CSS via a data attribute.


  • showing or hiding sticky elements based on scroll direction
  • only changing its direction attribute when scrolled a significant amount

  • ignoring small scroll movements

    that cause unwanted jitters



Download Links

Scroll to Top