vue-use-spring

Natural animations with springs

Usage no npm install needed!

<script type="module">
  import vueUseSpring from 'https://cdn.skypack.dev/vue-use-spring';
</script>

README

vue-use-spring Build Status npm package coverage thanks

💫 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

This project was created using the Vue Library boilerplate by posva