0.0.25 • Published 2 years ago

vue-scroll-motion v0.0.25

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

vue-scroll-motion

Demo Link

demo

install

npm install vue-scroll-motion

Import components

import VueScrollMotion from 'vue-scroll-motion'

Example

<template>
  <VueScrollMotion
    disable_multiple_animation
    :animation="[
      { opacity: 0, translate: '0 100', rotate: 180 },
      { opacity: 1, translate: '0 0', rotate: 0 },
      { opacity: 0, translate: '0 -100', rotate: -180 },
    ]"
  >
    ...
  </VueScrollMotion>
</template>

<script lang="ts">
import { defineComponent } from "vue"

import VueScrollMotoin from 'vue-scroll-motion'

export default defineComponent({
  components: {
    VueScrollMotion,
  },
})
</script>

Options

optiondescriptiontypedefault
animationReferenceArray<AnimationType>
disable_multiple_animationPrevent animations from running at the same timebooleanfalse
heightSection height for scroll percentage.number100(vh)

Animation Prop Example

[
  { opacity: 0, translate: '0 100' },
  { opacity: 1, translate: '0 0' },
  { opacity: 0, translate: '0 -100' },
]

Explain

scroll percentagedescription
0% ~ 50% scrollopacity 0 to 1 and translateY 100 to 0
50% ~ 100% scrollopacity 1 to 0 and translateY 0 to -100

If the component is located at the top of the document, the scroll percentage starts at 50%.


Supported Animation Type

opacity, translate, rotate, scale

Support for custom animation features will be provided


Support

  • (!) Vue3
  • Chrome >= 104
  • Safari >= 14.1
  • IOS Safari >= 14.5
0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago