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

vue-mouse-parallax

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-mouse-parallax

[![npm](https://img.shields.io/npm/v/vue-mouse-parallax.svg) ![npm](https://img.shields.io/npm/dm/vue-mouse-parallax.svg)](https://www.npmjs.com/package/vue-mouse-parallax) [![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuejs.org/

  • 1.3.0
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

vue-mouse-parallax

npm npm vue2

An easy to use Mouse Parallax Component - Made with Vue.js

Demo

vuejs mouse parallax

Installation

npm install --save vue-mouse-parallax

Default import

Install all the components:

import Vue from 'vue'
import VueMouseParallax from 'vue-mouse-parallax'

Vue.use(VueMouseParallax)

Use specific components:

import Vue from 'vue'
import { ParallaxContainer, ParallaxElement } from 'vue-mouse-parallax'

Vue.component('parallax-container', ParallaxContainer)
Vue.component('parallax-element', ParallaxElement)

Browser

<script src="vue.js"></script>
<script src="vue-mouse-parallax/dist/vue-mouse-parallax.common.js"></script>

Usage

In order for the effect to work, the <parallax-element /> should be contained within <parallax-container />

Options can then be passed to <parallax-element /> like so :

<parallax-container>
    <parallax-element :parallaxStrength="10" type="translation" tag="div">
        <h2>Put your content here</h2>
     </parallax-element>
</parallax-container>

Props

parallax-container

PropTypeDefault ValueDescription
animationDurationNumber1000Speed of the parallax animation in ms
easingStringcubic-bezier(0.23, 1, 0.32, 1)Easing of the parallax animation
tagStringdivTakes any valid html tag
perspectiveNumber1000Effective for the 'depth' parallax type

parallax-element

PropTypeDefault ValueDescription
parallaxStrengthNumber10Strength of the Parallax Effect
typeString'translation''translation' - 'rotation' - 'depth'
tagStringdivTakes any valid html tag

Todo

License

MIT

Keywords

FAQs

Package last updated on 30 Dec 2019

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