# parallaxy

> Adds parallax effect to images and videos

Latest version **2.0.1** (published 2015-11-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install parallaxy
pnpm add parallaxy
yarn add parallaxy
bun add parallaxy
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2015-11-27 |
| First published | 2015-11-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Ivar Borthen |
| Maintainers | iborthen |
| Keywords | javascript, parallax, image-parallax, video-parallax, img, video, supersmooth, smooth, smoothscroll |

## Links

- npm: https://www.npmjs.com/package/parallaxy
- Repository: https://github.com/wearecolours/parallaxy
- Homepage: https://github.com/wearecolours/parallaxy#readme
- Issues: https://github.com/wearecolours/parallaxy/issues
- npm.io page: https://npm.io/package/parallaxy

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2015-11-27
- 2.0.0 — 2015-11-26
- 1.2.4 — 2015-11-26
- 1.2.3 — 2015-11-26
- 1.2.2 — 2015-11-26
- 1.2.1 — 2015-11-26
- 1.2.0 — 2015-11-26
- 1.1.1 — 2015-11-24
- 1.1.0 — 2015-11-20
- 1.0.0 — 2015-11-20
- 0.2.0 — 2015-11-20
- 0.1.0 — 2015-11-19

## README

### What it is

Adds parallax effect to images and videos.

### Installation

parallaxy.js is available as an [npm package](https://www.npmjs.com/package/parallaxy).

```
npm install parallaxy --save
```

Add **parallaxy.min.js** to the bottom of the `<body>` like this:

```
<script src="parallaxy.min.js"></script>
```


### Note

This is an very early version of parallaxy.


## How to Use

### Usage

In this example the image will have a parallaxy effect.

```html
<div data-parallaxy>
	<img src="image.jpg">
	<div data-parallaxy-ignore>
		<h1>Content above</h1>
	</div>
</div>
```

### After DOM change

If the DOM has changed and you want to reset Parallaxy, just run;

```
Parallaxy.refresh();
```


### Options

Options must be passed via data-attributes. Append the option name to `data-parallaxy-`, as in `data-parallaxy-speed="0.25"`.

| Name          | Type      | Default   | Description                                  |
|---------------|-----------|-----------|----------------------------------------------|
| speed	        | Float     | 0.5       | Adjust parallaxy effect from 0-1 (none-max)  |
| ignore	    | Boolean   | false     | Ignore parallaxy effect on this element      |


Global options (data-attribute):

| Name                 | Type      | Default   | Description                                  |
|----------------------|-----------|-----------|----------------------------------------------|
| ignoresmoothscroll   | Boolean   | null      | Ignore smoothMouseWheel. Place anywhere      |


### Browser Support

Coming soon. Uses CSS translate2D to scale and position images.


### License

The code is available under the [MIT License](https://github.com/wearecolours/parallaxy/blob/master/LICENSE.md).

---
_Source: https://npm.io/package/parallaxy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
