Skip to main content
A settings page and an onboarding flow should not move the same way. Doing that by hand means auditing every duration and distance in the product, and doing it again the next time the answer changes.
Neither tm-press nor tm-slide-block-start knows the profile exists. They read inherited custom properties, and the profile sets them.

The three profiles

Settings, finance, dashboards, long-form reading.Short travel, no overshoot, curves that only decelerate. Motion here confirms a change without asking to be watched.
tm-motion-default returns a subtree to the library defaults — useful for a region that should not inherit a surrounding personality. Each profile also sets all five easing roles.

A profile changes feel, not vocabulary

Duration is a factor. tm-pop stays livelier than tm-fade-in in all three profiles, because each animation multiplies its own tuned default: The library never flattens everything to one global duration. That is the difference between a personality and a find-and-replace.

Explicit values still win

tm-duration-*, tm-delay-*, tm-ease-*, tm-repeat-*, tm-distance-* and tm-stagger-* set --tm-duration, --tm-easing or --tm-distance directly on the element, and those are read before the profile factors rather than multiplied by them.

Nesting

Profiles are inherited custom properties, so the nearest ancestor wins. There is no resolution order to learn beyond normal CSS inheritance.

One axis at a time

Sometimes a subtree needs part of a personality and not the rest. tm-no-overshoot is the one to reach for when a springy entrance is wrong in one place but the rest of the personality is right.

Reduced motion

Profiles need no special handling. Under prefers-reduced-motion: reduce every animation and transition collapses to 1ms regardless of the factors, and the state a class communicates still lands. A calm profile and an expressive one behave identically — which is correct, because the user asked for neither.

Choosing a profile

If you are unsure, use tm-motion-productive. It is the recommended default for product UI, and the one profile that is hard to get wrong: fast enough that frequently repeated interactions do not feel padded, restrained enough that nothing draws attention it has not earned.
Two rules of thumb from the literature this library follows:
  • Frequency beats taste. If a user will see the animation a hundred times a day, it should be short or absent. Calm and productive both respect that; expressive does not, which is why it belongs on the paths a user walks once.
  • Larger elements move slower. A full-page dialog at the same duration as a tooltip reads as sluggish for the tooltip and abrupt for the dialog. The per-class defaults already encode this; profiles scale the whole set without disturbing the ratios.