Mini animate() doesn't support type: "spring"
You're using the mini animate() function and you've set type: "spring".
animate(
element,
{ transform: "translateX(100px)" },
{ type: "spring" }
)
Explanation
The mini animate() function is built exclusively on the Web Animations API. It's designed to be as small as possible, while maintaining as many features from the hybrid WAAPI/JS animate() function as possible.
To hit this tiny bundlesize, spring animations are not included by default.
Solution
Import spring from "motion":
import { animate } from "motion/mini"
import { spring } from "motion"
Or if you're creating a React animation using useAnimate:
Then set type directly to the imported spring:
animate(
element,
{ transform: "translateX(100px)" },
{ type: spring }
)