Skip to main content

Installation

Jarallax can be installed and used in multiple ways depending on your project setup. Choose the method that best fits your workflow.

Package Manager Installation

Install Jarallax as a Node.js module using your preferred package manager:
The package includes TypeScript definitions, so no additional @types package is needed.

Import Methods

Once installed, you can import Jarallax using different module systems depending on your bundler and project setup. For modern bundlers like Webpack, Rollup, or Vite:
The video extension (jarallaxVideo) is optional and only needed if you plan to use YouTube, Vimeo, or self-hosted video backgrounds.

TypeScript

Jarallax includes full TypeScript definitions:

CDN Installation

For quick prototyping or projects without a build step, use a CDN.

ESM via CDN

Use ES modules directly in the browser:

UMD via CDN

For traditional script tag usage with global variables:
When using UMD, jarallax is available as a global variable. Make sure to include the script before trying to use it.

jQuery Support (Optional)

If you’re using jQuery, Jarallax automatically adds a jQuery plugin interface when loaded in UMD mode:
jQuery is not required for Jarallax to work. The vanilla JavaScript API is recommended for modern projects.

Local Installation

You can also download and host Jarallax files locally:
1

Download the package

Download from npm or GitHub releases
2

Copy distribution files

Copy files from the dist/ directory to your project:
  • jarallax.min.js or jarallax.esm.min.js
  • jarallax.min.css
  • jarallax-video.min.js (optional, for video backgrounds)
3

Reference in your HTML

Verify Installation

To verify Jarallax is installed correctly, check the version:

What’s Included

The package includes:
  • Core library: Parallax functionality for images
  • Video extension: Support for YouTube, Vimeo, and local videos
  • CSS styles: Required styles for proper positioning
  • TypeScript definitions: Full type support
  • Source maps: For debugging

Next Steps

Quick Start Guide

Learn how to create your first parallax effect with Jarallax