Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

paralless

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paralless

Hyper-minimal parallax implementation for subtle animation.

  • 0.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
37
decreased by-30.19%
Maintainers
1
Weekly downloads
 
Created
Source

paralless

Hyper-minimal parallax implementation for subtle animation. 349b gzipped.

js-standard-style

Usage

Import the library and pass a selector as its only argument. Then, call init() on the returned instance to start watching scroll events and animating all selected elements.

import { paralless } from 'paralless'

const para = paralless('.my-parallax-selector')

para.init()

Optionally define speeds in your markup via the data-speed attribution. This option defaults to 2 and so halves the distance scrolled, creating a effect that is half the speed of your scroll. Increase or decrease this integer to find your desired effect.

<div class='my-parallax-selector' data-speed='4'>...children...</div>
<div class='my-parallax-selector' data-speed='10'>...children...</div>
.my-parallax-selector {
  transition: transform 200ms ease-in-out;
}

MIT License

Keywords

FAQs

Package last updated on 12 Jul 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc