vertex-changelog/composables/useScrollReveal.js
2025-04-25 19:38:09 +05:30

22 lines
373 B
JavaScript

// composables/useScrollReveal.js
import { useMotion } from '@vueuse/motion'
export const useScrollReveal = (elRef) => {
useMotion(elRef, {
initial: {
opacity: 0,
y: 40,
},
visible: {
opacity: 1,
y: 0,
transition: {
type: 'spring',
stiffness: 250,
damping: 20,
},
},
onAppear: true,
})
}