Motion
The Axmed Design System uses intentional, purposeful animation to enhance user experience. Our motion tokens are based on the 12 Principles of Animation and web motion best practices.Motion Principles
Our approach to motion follows these key principles:Purposeful
Every animation serves a clear purpose: guiding attention, providing feedback, or showing relationships between elements.
Performant
Animations use GPU-accelerated properties (transform, opacity) and respect user motion preferences.
Natural
Easing curves mimic real-world physics: objects accelerate and decelerate naturally, not linearly.
Subtle
Motion enhances but doesn’t distract. Animations are fast enough to feel responsive, not sluggish.
Easing Curves
Easing curves define the acceleration and deceleration of animations. We use cubic-bezier curves for precise control.Ease Out (Default for Entrances)
Use for elements entering the view. Fast start with smooth deceleration creates a spring-like, natural feel.- Modal entrances
- Dropdown menus appearing
- Tooltips showing
- Content expanding
- Fade-in animations
Ease In (Exits)
Use for elements leaving the view. Slow start that accelerates creates a decisive, quick exit.- Modal dismissals
- Dropdown menus closing
- Tooltips hiding
- Content collapsing
- Fade-out animations
Ease In-Out (Symmetric)
Use sparingly for animations that don’t have a clear entrance or exit.- Progress bars
- Sliders
- Symmetric state changes
Ease Spring (Playful)
Playful overshoot effect. Use for celebratory moments and success feedback.- Success checkmarks
- Toast notifications entering
- Celebration animations
- Attention-grabbing elements
Ease Drawer (Sheet Slide)
Specialized curve for sheet and drawer animations, inspired by iOS sheet slides and Ionic framework.- Drawer slide-in/out
- Sheet bottom-to-top entrance
- Large surface transitions
Durations
Animation durations are carefully chosen to feel responsive without being rushed or sluggish.| Token | Value | Usage |
|---|---|---|
--duration-fast | 100ms | Micro-interactions: row select, checkbox tick |
--duration-base | 150ms | Default: hover states, close buttons |
--duration-slow | 250ms | Overlays entering/leaving (modals) |
--duration-drawer | 350ms | Drawer slide — longer for large surfaces |
Duration Guidelines
Fast (100ms) — Instant Feedback
Fast (100ms) — Instant Feedback
Use for immediate response to user input. These animations should feel instantaneous:
- Checkbox/radio button selection
- Table row selection
- Toggle switches
- Button press states
Base (150ms) — Default Transitions
Base (150ms) — Default Transitions
Use for standard UI transitions. This is the default duration for most hover and focus states:
- Button hover states
- Link color transitions
- Icon color changes
- Close button interactions
Slow (250ms) — Overlay Transitions
Slow (250ms) — Overlay Transitions
Use for larger elements entering or leaving the view:
- Modal fade-in/fade-out
- Dropdown menu appearance
- Tooltip transitions
- Alert notifications
Drawer (350ms) — Large Surface Animations
Drawer (350ms) — Large Surface Animations
Use specifically for drawer and sheet animations that involve large surfaces:
- Drawer slide-in from side
- Bottom sheet slide-up
- Full-screen overlay transitions
Focus Ring
Accessibility focus indicators use consistent styling across all interactive elements:Usage Examples
Button Hover Transition
Modal Entrance Animation
Drawer Slide-In
Success Checkmark (with Spring)
Dropdown Menu
Accessibility: Respecting Motion Preferences
The design system automatically honors the user’s operating system motion preference usingprefers-reduced-motion.
Animation Best Practices
Performance
Use GPU-accelerated properties
Use GPU-accelerated properties
Stick to
transform and opacity for smooth 60fps animations:Use will-change sparingly
Use will-change sparingly
Only use
will-change for animations you know will happen:Choreography
Sequence related animations
Sequence related animations
Match entrance and exit patterns
Match entrance and exit patterns
If an element slides in from the left, it should slide out to the left (not fade out).
Purposeful Motion
Every animation needs a reason
Every animation needs a reason
Don’t animate just because you can. Motion should:
- Guide user attention
- Provide feedback
- Show spatial relationships
- Maintain context during transitions
Keep it subtle
Keep it subtle
Animations should enhance the experience, not demand attention. When in doubt, go faster and subtler.
All motion tokens are defined in
_motion.scss and automatically included when you import the design system’s CSS.