One time constant for every movement
Movement in RAMTT’s design system comes from one model: a first-order lag with a time constant of 50 ms. Five spring curves in the tokens cover the motion that CSS runs on its own.
An element that moves with the design system’s motion model does not jump to its target. Each frame it covers part of the distance that remains, and the size of that part depends on the time since the last frame. After 50 ms it has covered 63% of the distance, and after 150 ms it has covered 95%. The 50 ms is the one time constant in behaviour/motion.mjs, a file of 334 lines.
A time constant (τ) is the time a lag takes to cover 63% of the distance that remains. The model computes each frame from the real time between frames, so a slow frame moves the element further, and the speed in milliseconds is the same on a 60 Hz and a 120 Hz screen.
The curve of a lag is the same at every distance: a panel that moves 40 px and a sheet that moves 800 px both reach 63% at 50 ms. When the target changes during a movement, the lag continues from the element’s current position, so a second click changes the goal without starting a new curve.
The file opens with three defects, found on 30 August in the reference file it replaced. The first was a negative time step: the first animation frame can carry a timestamp from before the call that started it, so one frame moved the wrong way. The time step is now clamped at 0.
The second was a ceiling of 1/30 s on the time step, which bent the motion on heavy frames. The ceiling is now 1/10 s, long enough to survive a stall and short enough to skip a switch of tabs. The third was a throw read from a hand that had stopped. If the hand stands still for more than 80 ms before release, the velocity is now zero.
A CSS transition needs its curve and its duration before it starts, so it cannot run a lag. For the motion CSS runs, the tokens hold five spring curves, written as CSS linear() functions with a duration each: follow at 231 ms, snap at 356 ms, settle at 383 ms, release at 419 ms and zoom at 471 ms.
Two surfaces that move together use a staggered layer. The second starts 100 ms after the first and moves with the same τ. Under the hand both move 1:1, and the stagger applies only to motion that a click or a key starts.
Reduced motion is checked on every call. When your system asks for less motion, the element is placed at its target in one frame and no animation runs.
In the file
The values below come from behaviour/motion.mjs and the tokens, read on 31 October 2026.
- τ is 50 ms, in
TAU. - A throw slows with τ at 75 ms, in
TAU_MOMENTUM. - A hand that stands still for 80 ms or more throws nothing, in
STILL_MS. - The time step is at least 0 and at most 1/10 s.
- A state change in a component fades out in 150 ms and in at once, in
--state-outand--state-in.
Malte TherkildsenI’m a web and software developer in Aarhus, Denmark. I build RAMTT and Zibaldone, and I keep RAMTT’s design system.