@kcirtaptrick/framer-motion
Version:
A simple and powerful React animation library
20 lines (19 loc) • 594 B
TypeScript
import { MotionValue } from ".";
/**
* Creates a `MotionValue` to track the state and velocity of a value.
*
* Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop.
*
* ```jsx
* export const MyComponent = () => {
* const scale = useMotionValue(1)
*
* return <motion.div style={{ scale }} />
* }
* ```
*
* @param initial - The initial state.
*
* @public
*/
export declare function useMotionValue<T>(initial: T): MotionValue<T>;