Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/min30327/luxy.js

Inertia scroll and parallax effect plugin in Vanilla.js
https://github.com/min30327/luxy.js

Last synced: about 2 months ago
JSON representation

Inertia scroll and parallax effect plugin in Vanilla.js

Awesome Lists containing this project

README

        

# luxy.js

Inertia scroll and parallax effect plugin in Vanilla.js

## Demo
[View the demo](http://min30327.github.io/luxy.js/)

## Installation

You can install it using npm:

```
npm install luxy.js --save
```

Or just include the script in your page:

```html

```

Included luxy.js in your project and initialize:

```html

luxy.init();

```

## Usage

Wrap the entire content with the element specified in the wrapper option. Please exclude fixed elements.

```html


... Entire content

```

Add .luxy-el to the element for which parallax effect is to be specified.

```html




```

Specify the speed of the parallax effect with the data-speed-y attribute and offset with the data-offset attribute.

```html




```

If you want to move horizontally, specify data-horizontal="1" and specify the speed in the horizontal direction with the data-speed-x attribute.

```html




```

## Options

| Name | default | description |
|--------------|------------|-----------------------------------|
| wrapper | '#luxy' | Entire content wrapper element. |
| targets | '.luxy-el' | Parallax effect targets elements. |
| wrapperSpeed | 0.08 | Inertia scroll speed. |