Skip to content

Motion

Timing, easing, and pre-composed transitions that make the UI feel responsive and alive.

Duration

How long an animation takes. Short durations suit small changes; longer ones give complex movements room to breathe. Press Play to see each duration side by side.

Instant0ms
Fast100ms
Normal200ms
Slow300ms
Slower400ms
Slowest600ms

Easing

How animations accelerate and decelerate. Press Play to compare every curve at the same duration.

LinearConstant speed
Ease OutFast start, slow end
Ease InSlow start, fast end
Ease In-OutSlow start and end
BounceElastic overshoot

Pre-composed Transitions

Ready-made transition values that pair a duration with an easing curve. Hover each button to see the effect it controls.

DefaultGeneral purpose
FastMicro-interactions
ColorsColor changes
TransformScale & translate
OpacityShow / hide
ShadowElevation shifts

Usage

Basic transition

css
.my-element {
  transition: var(--coar-transition-default);
}

Custom transition with tokens

css
.my-element {
  transition:
    background-color var(--coar-duration-normal) var(--coar-ease-out),
    transform var(--coar-duration-fast) var(--coar-ease-bounce);
}

Animation with duration

css
@keyframes slide-in {
  from { transform: translateY(-8px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.my-element {
  animation: slide-in var(--coar-duration-normal) var(--coar-ease-out);
}

Accessibility

All motion tokens respect the prefers-reduced-motion media query. When a user opts for reduced motion, every duration collapses to 0 ms — transitions become instant and nothing moves unexpectedly.

css
@media (prefers-reduced-motion: reduce) {
  :root {
    --coar-duration-fast:    0ms;
    --coar-duration-normal:  0ms;
    --coar-duration-slow:    0ms;
    --coar-duration-slower:  0ms;
    --coar-duration-slowest: 0ms;
  }
}

INFO

Always use COAR duration tokens instead of hardcoded values. This ensures animations are automatically disabled for users who prefer reduced motion.

Token Reference

Duration

TokenValueUsage
--coar-duration-instant0 msNo animation (immediate)
--coar-duration-fast100 msMicro-interactions, hover states
--coar-duration-normal200 msMost transitions
--coar-duration-slow300 msComplex state changes
--coar-duration-slower400 msLarge movements
--coar-duration-slowest600 msPage-level transitions

Easing

TokenUsage
--coar-ease-linearConstant speed — for opacity, color
--coar-ease-outFast start, slow end — most UI motion
--coar-ease-inSlow start, fast end — dismissals
--coar-ease-in-outSlow start and end — complex motions
--coar-ease-bounceElastic overshoot — playful feedback

Pre-composed Transitions

TokenUsage
--coar-transition-defaultGeneral-purpose transition
--coar-transition-fastQuick micro-interactions
--coar-transition-colorsBackground and text color changes
--coar-transition-transformScale, rotate, translate
--coar-transition-opacityShow / hide transitions
--coar-transition-shadowElevation changes on hover

Released under the Apache-2.0 License.