Skip to main content
Shared behaviour, true of every class below unless stated otherwise:
  • Profile factors --tm-duration-scale, --tm-emphasis, --tm-overshoot, --tm-distance and --tm-stagger-step are inherited and scale the class.
  • Explicit overrides --tm-duration, --tm-delay, --tm-easing, --tm-iteration-count and --tm-exit-duration win over any inherited profile.
  • Reduced motion collapses the class to 1ms. Two exceptions are marked.
  • RTL: inline-axis classes mirror, block-axis classes do not.
  • Closed durations shown are the default 70% ratio.

Motion personalities

Single-axis: tm-speed-75tm-speed-150, tm-emphasis-0tm-emphasis-150, tm-no-overshoot.

Presence

Requires: a recognised state attribute, or none — an element with no state is treated as open. Closed ends on visibility: hidden. Never repeats. Interruptible. See State-driven presence.

Native elements

Own variables: --tm-origin, --tm-backdrop-duration, --tm-marker-rotate. See Native elements.

Product recipes

tm-hold-confirm keeps its full duration under reduced motion. See Product recipes.

Scroll-driven

Range modifiers: tm-scroll-range-entry, -cover, -contain, -exit. Easing is always linear — progress-linked motion should track the scroll exactly. Switched off under reduced motion, leaving content visible. See Scroll-driven motion.

Choreography

A container with data-state plays the entrance when open and the exit when closed. Indices are generated for 20 children; child 21 onward reuses the last. See Choreography.

Interactions

Transitions, so they stack on one element and reverse mid-flight. tm-press and tm-rotate-press skip :disabled and [aria-disabled="true"]. tm-icon-swap requires exactly two element children.

Entrances

Keyframes, once, fill-mode: both.
tm-zoom-out is an entrance despite its name — it settles in from a larger scale. For a real exit use tm-scale-out. The name is kept for compatibility.

Exits

Each ends on its final frame, so the element stays hidden but still occupies layout. Remove the node, or apply hidden, once the animation finishes. For an exit that has to be interruptible, use presence instead.

Continuous

Loop by default. Every one is decorative — pair with motion-safe: when it carries no information.

Attention

Run once. Use for an error or a rejected action, never for decoration.

Timing utilities

Plus tm-motion-paused, tm-motion-running, tm-motion-reset, tm-gpu, tm-perspective, tm-3d.

Prebuilt variants

The bundled stylesheet includes a curated set: hover:, focus:, focus-visible:, active:, focus-within:, group-hover:, motion-safe:, and selected responsive combinations for the most common animations. The base tm-* class is always available. Per-animation imports do not include these — they live in variants.css.