ELFBAR

Motion

ELFBAR Design System motion guidelines, including transition durations, easing curves, and animation principles.

Motion enhances user experience by providing visual feedback and spatial awareness. Follow these principles to ensure consistent interactive experiences.

Design Principles

  • Purposeful — Motion serves function, not decoration. Every animation should convey information or guide attention
  • Responsive — Interaction feedback should be immediate; avoid making users wait
  • Natural — Use the laws of motion from the physical world; avoid linear or abrupt transitions

Transition Durations

TokenDurationUsage
duration-instant100msToggle switches, button state changes
duration-fast150msHover effects, focus indicators, ripples
duration-normal250msExpand/collapse, tab switching
duration-slow350msModal dialogs, page transitions
duration-slower500msComplex layout animations, initial load

Easing Curves

CurveCSS ValueUsage
Standardcubic-bezier(0.2, 0, 0, 1)Most UI transitions
Deceleratecubic-bezier(0, 0, 0, 1)Elements entering the viewport
Acceleratecubic-bezier(0.3, 0, 1, 1)Elements leaving the viewport
LinearlinearProgress bars, loading indicators

Common Interaction Animations

Button

  • Hover: background color transition 150ms standard
  • Press: scale to 0.98 + ripple effect
  • Disabled: no animation, opacity reduced directly

Dialog

  • Open: scale in from center + backdrop fade in 250ms decelerate
  • Close: fade out 200ms accelerate

Tabs

  • Switch: underline slides 250ms standard
  • Content area: fade in 150ms

Expand / Collapse

  • Height transition: 250ms standard
  • Combined with rotating chevron icon: 150ms standard