createAnimateMini
createAnimateMini has the same [scope, animate] shape as
createAnimate, but it uses the WAAPI-only animateMini path. It does not
include springs, inertia, or timeline scrubbing.
import { createAnimateMini } from 'motion-solidjs'
function Toast() {
const [scope, animate] = createAnimateMini<HTMLDivElement>()
const dismiss = () => animate(scope.current!, { opacity: 0, y: -8 }, { duration: 0.2 })
return (
<div ref={scope}>
<button onClick={dismiss}>Close</button>
</div>
)
}
Use it when bundle size matters and linear or cubic-bezier easing is enough.