1.3.3 • Published 3 years ago

vue-kinesis v1.3.3

Weekly downloads
1,094
License
-
Repository
github
Last release
3 years ago

vue-kinesis

npm vue2 vue2

Easy to use Vue.js components for creating interactive animations

Demo

Kinesis Demo

Vue3 - Installation

npm install --save vue-kinesis@next

Vue3 - Default import

Install all the components:

import { createApp } from "vue";
import App from "./App.vue";
import VueKinesis from "vue-kinesis";

const app = createApp(App);
app.use(VueKinesis);

app.mount("#app");

Vue2 - Installation

npm install --save vue-kinesis

Vue2 - Default import

Install all the components:

import Vue from 'vue'
import VueKinesis from 'vue-kinesis'

Vue.use(VueKinesis)

Use specific components:

import Vue from 'vue'
import { KinesisContainer, KinesisElement } from 'vue-kinesis'

Vue.component('kinesis-container', KinesisContainer)
Vue.component('kinesis-element', KinesisElement)

Browser

<script src="vue.js"></script>
<script src="vue-kinesis.min.js"></script>

Usage

How to use

Props

kinesis-container

PropTypeDefault ValueDescription
activeBooleantrueTo enable or disable the interactions
durationNumber1000Speed of the parallax animation in ms
easingString"cubic-bezier(0.23, 1, 0.32, 1)"Easing of the parallax animation
tagStringdivTakes any valid html tag
eventString"move"Event to which the container will react. Possible values are "move" and "scroll"
perspectiveNumber1000Effective for the 'depth' parallax type
audioStringPath towards an audio file
playAudioBooleanStart/Stop the attached audio file

kinesis-element

PropTypeDefault ValueDescription
strengthNumber10Strength of the motion effect
typeString"translate"translate - rotate - scale - scaleX - scaleY - depth - depth_inv
tagString"div"Takes any valid html tag
transformOriginString"center"Similar to the CSS transform-origin property
originXNumber50The motion's origin relative to the container, on the X axis. 50 being the center of the container, 0 the left side, 100 the right side.
originYNumber50The motion's origin relative to the container, on the Y axis. 50 being the center of the container, 0 the top side, 100 the bottom side.
axisStringnullConstrain the movement to one axis. Possible values: "x" - "y"
maxXNumbernullLimit the maximum range of the movement on the X axis
maxYNumbernullLimit the maximum range of the movement on the Y axis
minXNumbernullLimit the minimum range of the movement on the X axis
minYNumbernullLimit the minimum range of the movement on the Y axis
cycleNumber0How many times the movement will repeat

kinesis-audio

PropTypeDefault ValueDescription
audioIndexNumber50To which frequency to react, on a range of integer values that goes from 0 to 127.
strengthNumber10Strength of the motion effect
typeString"translate"translate - rotate - scale - scaleX - scaleY - depth - depth_inv
tagString"div"Takes any valid html tag
transformOriginString"center"Similar to the CSS transform-origin property
originXNumber50The motion's origin relative to the container, on the X axis. 50 being the center of the container, 0 the left side, 100 the right side.
originYNumber50The motion's origin relative to the container, on the Y axis. 50 being the center of the container, 0 the top side, 100 the bottom side.
axisStringnullConstrain the movement to one axis. Possible values: "x" - "y"
maxXNumbernullLimit the maximum range of the movement on the X axis
maxYNumbernullLimit the maximum range of the movement on the Y axis
minXNumbernullLimit the minimum range of the movement on the X axis
minYNumbernullLimit the minimum range of the movement on the Y axis
cycleNumber0How many times the movement will repeat

Migrating from vue-mouse-parallax

Migration from vue-mouse-parallax is quite easy:

Components

  • parallax-container -> kinesis-container
  • parallax-element -> kinesis-element

Props

  • parallaxStrength -> strength
  • animationDuration -> duration

Prop values

  • translation -> translate
  • rotation -> rotate

License

MIT

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

2.0.3

3 years ago

1.2.1

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.9.7

4 years ago

0.9.6

4 years ago

0.9.5

4 years ago

0.9.4

4 years ago

0.9.3

4 years ago

0.9.2

4 years ago

0.9.1

4 years ago

0.9.0

4 years ago