Examples · Motion & accessibility
Spring physics
springSignal(): write the target, read the animated current value.
A spring is a value, not a timeline. You write target; current follows with physics and keeps its velocity when the target changes mid-flight. Bind it to a style and the layout takes care of itself.
What to notice
- Click quickly in different places: the box never snaps, it re-aims.
- Stiffness and damping are the only two knobs.
- With
prefers-reduced-motionthe spring jumps to the target.
Change damping to 8 for a bouncier feel.