Rellax is a buttery smooth, super lightweight, vanilla javascript parallax library. Rellax works on mobile!

GitHub Rellax

Getting started

<div class="rellax">I’m that default chill speed of "-2"</div>
<div class="rellax" data-rellax-speed="7">I’m super fast!!</div>
<div class="rellax" data-rellax-speed="-4">I’m extra slow and smooth</div>

  // Accepts any class name
  var rellax = new Rellax('.rellax');


There’s two ways to implement centering, either on specific elements or as a global option.

<div class="rellax" data-rellax-percentage="0.5">
  I’m that default chill speed of "-2" and "centered"
<div class="rellax" data-rellax-speed="7" data-rellax-percentage="0.5">
  I’m super fast!! And super centered!!
<div class="rellax" data-rellax-speed="-4" data-rellax-percentage="0.5">
  I’m extra slow and smooth, and hella centered.
  // Center all the things!
  var rellax = new Rellax('.rellax', {
    center: true