FIG-001/ LAYOUT

interrupt a layout spring, it keeps its speed.

Click Toggle twice, quickly. The spring puck swings round and heads back at the speed it was already moving, while the tween puck stops dead and turns, because a tween always starts the next layout animation from rest.

  • A layout transition with type: 'spring' and visualDuration / bounce or stiffness / damping carries its velocity into the next layout animation (Motion 14.13).
  • A tween, including the default layout transition, and a spring set with duration start from rest, so they end on time.
  • Any transition with repeat also starts from rest.
↩ all examples
api · layoutinput · type: 'spring'mode · live mode · live running source
Click Toggle twice, quickly
spring: keeps its speed
tween: starts from rest
category · layout
sheet · sheet 01 / 02
⟳ to re-run
FIG-002/ LAYOUT

mass from size, bigger moves heavier.

Both tiles move by the same distance on the same spring. With mass: 'auto' the large tile is heavier, so it lags and settles later while the small one snaps over; with the default mass of 1 they move in lockstep.

  • A 300 px square has mass 1. Mass follows the square root of width × height, between 0.25 and 2.
  • Damping is scaled with mass, so the bounce stays the same and bigger elements settle later.
  • "auto" only has an effect in layout animations; anywhere else it behaves like the default mass of 1.
↩ all examples
api · layoutinput · mass: 'auto'mode · live mode · live running source
small: -large: -
category · layout
sheet · sheet 02 / 02
⟳ to re-run

Layout velocity & mass auto