createMotionTemplate
A tagged template literal that returns a MotionValue<string>. Pass any motion values inline; the
template re-evaluates whenever any of them change. It is suited to CSS values like transform,
filter, clip-path, or custom properties.
import { createMotionValue, createMotionTemplate, motion } from 'motion-solidjs'
const x = createMotionValue(0)
const y = createMotionValue(0)
const transform = createMotionTemplate`translate(${x}px, ${y}px) rotate(${x}deg)`
return <motion.div style={{ transform }} />
60