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>
22 lines (21 loc) • 655 B
TypeScript
import { MotionValue } from '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>;