fin1te/dsv1.0.0
  1. ds
  2. Foundations
  3. Motion

Motion

One easing curve, short durations, reduced motion respected.

Easing and duration

One curve for everything: cubic-bezier(0.2, 0.7, 0.1, 1). It starts quick and settles slowly, so things feel responsive without bouncing.

TokenValueUse
--easecubic-bezier(0.2, 0.7, 0.1, 1)All transitions and entrances.
--dur-fast0.15sHover colour and border changes.
--dur0.2sToggles, toasts, opacity changes.
--dur-slow0.45sBars and meters changing value.
--dur-reveal0.7sContent fading in on scroll.

Top: --ease. Bottom: linear, for comparison.

Motion that explains

In diagrams, motion carries meaning: links flow the way data moves. topo offers four styles. Animations pause when the figure scrolls out of view.

flowTargetpacketsTargetcometTargetpulseTarget

anim=flow · packets · comet · pulse

Entrances

Fades up 10px over --dur-reveal.

Code
<p data-reveal class="in">Fades up 10px over --dur-reveal.</p>

Add data-reveal to a block and the class in when it enters the viewport (an IntersectionObserver, a few lines). Without JavaScript the content is simply visible.

Do
  • Animate opacity and transform only.
  • Keep hover changes under 0.2s.
  • Respect prefers-reduced-motion. ds.css already does.
Don't
  • Bounce, spring or overshoot.
  • Animate layout properties like height on large blocks.
  • Loop anything that is not live data.