Motion
useTween
A number that eases to each new value of its source, from wherever it is: a cart total, a percentage, a value you draw yourself. Change the source mid-way and it turns toward the new value from where it shows, with no jump. It rides the app's spring unless you give it your own spring, or a duration and easing, as everywhere else in vael-ui. With motion="false" on a ConfigProvider around it, or under reduced motion, it jumps. For a value that should keep its speed through a change, such as one following a drag, use useSpringValue.
Install
import { useTween } from 'vael-ui/motion'Examples
import { shallowRef } from 'vue'
import { useTween } from 'vael-ui/motion'
const total = shallowRef(0)
// Eases to each new total from wherever it is.
const shown = useTween(total, { duration: 600, easing: 'out' })