solid-motion turns your props into targets with Solid signals. motion-dom, the
engine under motion/react, runs the animations.
From a prop to a frame
Your component.
motion.div and createMotion take the same options.animateandexitwhile*propslayout
One target. The active props combine into one target. When two set the
same property, the one with the higher priority wins.
What changed. Only a property whose target changed starts an animation.
The others keep running.
motion-dom. Each property has its own animation.- Springs and easing
- Layout measurement
The browser. It moves the element on the compositor thread when it can, so
a busy page does not slow the animation down.
The server renders the initial target as inline style and attributes, so the
first paint is already in place.
What runs off the main thread
On an HTML element, these run through the Web Animations API:
opacity,filterandclipPath.x,y,scale,rotateand the other transforms, together as one animation.
These run on the main thread, frame by frame:
- Every value of an element with
onUpdate,layout,layoutIdortransformTemplate. - A motion value passed through
style. - SVG elements.
- An inertia transition,
transition.path,repeatDelay,repeatType: "mirror"and a spring withdamping: 0.