New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

interactiveparallax

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

interactiveparallax

Interactive parallax package by lnardon

latest
npmnpm
Version
2.2.0
Version published
Maintainers
1
Created
Source

Interactive Parallax

A module to create a parallax that interacts with the mouse move.

NPM JavaScript Style Guide

Demo

Live Demo Here

Installation

npm install interactiveparallax

Usage

JavaScript

import useParallax from "animationsequence";

// containerClass = the class name of the container where the parallax will happen.
// targetClass = the class name of the targets to apply the effect.
// alertMobileUser = argument to inform in case the device has no support for the package.(Optional)
useParallax(containerClass: string, targetClass: string, alertMobileUser?: boolean)

HTML Element

<!-- 
  parallax-speed-x = X-axis parallax speed for the target. (Number between 1 and 50)
  parallax-speed-y = Y-axis parallax speed for the target. (Number between 1 and 50)
-->
<div class="target" parallax-speed-x="7" parallax-speed-y="11"></div>

Example

<!-- HTML -->
<div class="splash">
  <h1 class="title target" parallax-speed="0.3">Interactive Parallax</h1>
  <div class="target" parallax-speed-x="13" parallax-speed-y="19"></div>
  <div class="target" parallax-speed-x="21" parallax-speed-y="14"></div>
</div>
// Javascript
useParallax("splash", "target", true);

The full source code of the Live Example can be found in the ./index.html file.

FAQs

Package last updated on 07 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts