<script setup lang="ts">
import { motionValue, useMotionValueEvent, useVelocity } from 'motion-v'
const x = motionValue(0)
const xVelocity = useVelocity(x)
useMotionValueEvent(xVelocity, 'change', (latest) => {
console.log('Velocity', latest)
})
</script>
<template>
<Motion :style="{ x }" />
</template>