Motion (Breath)

Motion & Animation

Motion in Eidetic follows one idea, Breath: movement that eases in and out the way breathing does, unhurried and without overshoot. Every curve is a cubic bezier. There are no springs, so nothing bounces past its target.

Duration Scale

Four tokens for every transition and animation

--duration-fast
Hover, focus and press feedback
150ms
--duration-base
Default for most transitions
200ms
--duration-slow
Dropdowns, popovers, larger surfaces
300ms
--duration-slower
Movement the eye should follow, like rolling digits
500ms

Use a token in Tailwind with duration-(--duration-base), or in CSS with var(--duration-base). Under prefers-reduced-motion all four drop to 0.01ms.

Breath Easing

Three curves, available as Tailwind utilities and as CSS variables

ease-breath-out
cubic-bezier(0.33, 1, 0.68, 1)

Entering. Quick start, soft landing, for things that appear or settle into place

ease-breath-in
cubic-bezier(0.32, 0, 0.67, 0)

Leaving. Slow start, then away, for things that close or move off screen

ease-breath
cubic-bezier(0.37, 0, 0.63, 1)

Between two resting states, like a toggle thumb or a sliding panel

Standard easing, for comparison

ease-out
cubic-bezier(0, 0, 0.2, 1)
ease-in
cubic-bezier(0.4, 0, 1, 1)
ease-in-out
cubic-bezier(0.4, 0, 0.2, 1)

Compare the Curves

All four boxes travel over --duration-slower. With reduced motion turned on in your OS they jump, which is the global rule at work

Breath out
Breath
Standard ease-out
Linear

Keyframe Animations

Tailwind's four built-in loops, which the components use

animate-spin

Spinner and loading buttons. Keeps turning under reduced motion

animate-ping

Live and notification dots

animate-pulse

Skeleton placeholders while content loads

animate-bounce

Typing and thinking dots

Code Examples

Durations and curves from the tokens, never hardcoded

Transition with Tailwind utilities

<button className="transition-colors duration-(--duration-fast) ease-breath-out hover:bg-primary-hover">
Save
</button>

Transition and keyframes in CSS

.panel {
transition: transform var(--duration-slow) var(--ease-breath-out);
}
@keyframes rise {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: none;
}
}
.rise {
animation: rise var(--duration-slow) var(--ease-breath-out);
}

Animation Best Practices

Guidelines for smooth, purposeful motion

Do

  • Use ease-breath-out for entering and ease-breath-in for leaving
  • Take durations from the tokens, so reduced motion and later tuning reach every component
  • Animate transform and opacity for best performance
  • Use will-change sparingly for known animations
  • Put data-motion="essential" on loading indicators that must keep moving
  • Test animations on 60Hz and 120Hz displays

Don't

  • Mix spring physics or overshoot with Breath easing
  • Animate width, height, or top/left (use transform instead)
  • Go past 500ms (--duration-slower)
  • Hardcode cubic-bezier values or millisecond numbers
  • Rely on motion alone to tell people something happened
  • Add animation to every element (use it purposefully)

Accessibility: Reduced Motion

What happens when a visitor asks their OS for less motion

globals.css makes every transition and keyframe animation finish at once. State still changes, and transitionend and animationend still fire, so code that waits for them keeps working. The --duration-* tokens drop to 0.01ms as well.

globals.css (simplified)
@media (prefers-reduced-motion: reduce) {
*:not(.animate-spin, [data-motion='essential'], [data-motion='essential'] *) {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}

Loading indicators keep moving, because a frozen loader reads as a hung page. .animate-spin is exempt, and so is everything inside an element with data-motion="essential". Spinner sets that attribute on all its variants.

CSS cannot reach animation that runs in JavaScript. Loops built on requestAnimationFrame check usePrefersReducedMotion and show the end value straight away. CountUp and CircleProgress do this.

import { usePrefersReducedMotion } from '@/lib/use-reduced-motion'
const reduceMotion = usePrefersReducedMotion()
useEffect(() => {
if (reduceMotion) return // render the end state, skip the loop
let frame = requestAnimationFrame(function step(now) {
// ...update, then
frame = requestAnimationFrame(step)
})
return () => cancelAnimationFrame(frame)
}, [reduceMotion])