motion-v
Version:
<p align="center"> <img width="100" height="100" alt="Motion logo" src="https://user-images.githubusercontent.com/7850794/164965523-3eced4c4-6020-467e-acde-f11b7900ad62.png" /> </p> <h1 align="center">Motion for Vue</h1>
34 lines (33 loc) • 909 B
TypeScript
/**
* Creates `AnimationControls`, which can be used to manually start, stop
* and sequence animations on one or more components.
*
* The returned `AnimationControls` should be passed to the `animate` property
* of the components you want to animate.
*
* These components can then be animated with the `start` method.
*
* ```jsx
* import { motion, useAnimationControls } from 'motion-v'
*
* export default defineComponent({
* setup() {
* const controls = useAnimationControls()
*
* controls.start({
* x: 100,
* transition: { duration: 0.5 },
* })
*
* return () => (
* <motion.div animate={controls} />
* )
* }
* })
* ```
*
* @returns Animation controller with `start`, `stop`, `set` and `mount` methods
*
* @public
*/
export declare function useAnimationControls(): import('../types').AnimationControls;