Skip to content

posva/vue-use-spring

Repository files navigation

vue-use-spring NPM version ci status

💫 Make natural animations with springs!

Installation

yarn add vue-use-spring
# or
npm install vue-use-spring

Usage

import { useSpring } from 'vue-use-spring'

const position = useSpring({ x: 0, y: 0 })

// change position like you would usually
position.x = 100
<p :style="{ transform: `translateX(${position.x}px)` }">I move!</p>

API

Related

License

MIT