0.0.25 • Published 6 months ago

vue-scroll-motion v0.0.25

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months 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

6 months ago

0.0.24

6 months ago

0.0.25

6 months ago

0.0.20

8 months ago

0.0.21

8 months ago

0.0.22

8 months ago

0.0.19

8 months ago

0.0.18

1 year ago

0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago