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>
22 lines (21 loc) • 662 B
TypeScript
import { MotionValue } from 'framer-motion/dom';
/**
* 将多个motion值组合成一个新的motion值,使用模板字符串语法
*
* ```vue
* <script setup>
* import { useSpring, motionValue, useMotionTemplate } from 'motion-v'
*
* const shadowX = useSpring(0)
* const shadowY = motionValue(0)
* const shadow = useMotionTemplate`drop-shadow(${shadowX}px ${shadowY}px 20px rgba(0,0,0,0.3))`
* </script>
*
* <template>
* <Motion :style="{ filter: shadow }" />
* </template>
* ```
*
* @public
*/
export declare function useMotionTemplate(fragments: TemplateStringsArray, ...values: Array<MotionValue | number | string>): MotionValue<string>;