Animations
Motion design tokens, keyframe animations, and transition utilities for consistent, performant animations across the platform.
Timing Tokens
Standardized durations and easing functions for consistent motion.
| Token | Value | Use Case |
|---|---|---|
--transition-fast |
150ms | Hover states, micro-interactions |
--transition-base |
200ms | Standard transitions, button clicks |
--transition-slow |
300ms | Page transitions, modals, panels |
| Name | Value | Use Case |
|---|---|---|
ease |
Default | General purpose |
ease-out |
Fast start, slow end | Entrances, appearing elements |
ease-in |
Slow start, fast end | Exits, disappearing elements |
cubic-bezier(0, 0, 0.2, 1) |
Decelerate | Cards, dropdowns |
cubic-bezier(0.68, -0.55, 0.265, 1.55) |
Bounce | Attention, playful UI |
Continuous Animations
Looping animations for loading states and attention.
ws-animate-spin
Loading spinners, refresh indicators
ws-animate-pulse
Attention, live indicators
ws-animate-pulse-scale
Heartbeat, recording
Entrance Animations
Animations for elements appearing on screen. Click "Replay" to see them in action.
ws-animate-fade-in
ws-animate-fade-in-up
ws-animate-fade-in-down
ws-animate-scale-in
ws-animate-slide-in-up
ws-animate-slide-in-down
ws-animate-slide-in-right
ws-animate-slide-in-left
Attention Animations
Animations to draw user attention or indicate state changes.
ws-animate-bounce-in
Success confirmations, achievements
ws-animate-shake
Errors, invalid input
Loading States
Visual feedback for async operations and content loading.
ws-spinner
Button loading, async operations
ws-loading-dots
AI thinking, typing indicator
ws-skeleton
Content placeholder loading
Staggered Animations
Sequential animations for lists and grids.
ws-stagger-children
Card grids, list items, navigation menus. Each child animates with 50ms delay.
Component Animation Patterns
Standard animations used by UI components.
| Component | Enter Animation | Exit Animation | Duration |
|---|---|---|---|
| Modal | scale-in + fade-in |
scale-out + fade-out |
200ms / 150ms |
| Dropdown | slide-in-down + fade-in |
fade-out |
200ms / 150ms |
| Toast | slide-in-right |
fade-out + translateX |
300ms / 200ms |
| Drawer | slide-in-right |
slide-out-right |
300ms |
| Card (list) | slide-in-up + stagger |
fade-out |
400ms / 200ms |
| Tooltip | fade-in |
fade-out |
150ms |
| Button (loading) | spin |
— | 700ms loop |
| Page transition | page-enter |
page-exit |
400ms / 200ms |
Accessibility
Motion accessibility is built into the animation system.
All animations respect the user's prefers-reduced-motion setting. When enabled, animations are disabled or reduced to simple opacity changes.
aria-label="Loading" or equivalent text. Never rely solely on animation to convey information.Usage
- Use subtle animations (200-400ms)
- Animate entrance, not exit (faster exits)
- Use ease-out for entrances
- Stagger lists for visual flow
- Respect reduced motion preferences
- Animate everything (be selective)
- Use long durations (>500ms)
- Block user interaction during animations
- Use bounce/spring for serious UI
- Animate layout properties (width/height)
File Reference
| File | Purpose |
|---|---|
css/base/_animations.css |
All keyframes, utility classes, spinners, skeletons |
design-system/platform-tokens.css |
Timing tokens (--transition-fast, --transition-base, --transition-slow) |