motion-v
Version:
<h1 align="center"> <img width="35" height="35" alt="Motion logo" src="https://github.com/user-attachments/assets/00d6d1c3-72c4-4c2f-a664-69da13182ffc" /><br />Motion for Vue</h1>
34 lines (33 loc) • 917 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('motion-dom').LegacyAnimationControls;