Understanding Animation Types
There are two types of animations in Motion Icons React:- Main Animations: Loop continuously (or based on triggers)
- Entrance Animations: Play once when the icon first appears
Main Animations
Main animations loop continuously by default. You can control when they play using thetrigger
prop (see examples below).
Pulse
A gentle pulsing effect that scales the icon slightly larger and smaller.- Notification badges
- Drawing attention to important buttons
- Live status indicators
- Heartbeat or activity monitors
Spin
Continuous 360-degree rotation at a steady speed.- Loading spinners
- Refresh/reload buttons
- Processing indicators
- Sync status icons
Loader2
, RefreshCw
, or Settings
for best visual effect.
Bounce
Vertical bouncing motion with elastic easing, like a ball bouncing.- Scroll-to-top buttons
- Download buttons
- Call-to-action elements
- Playful, friendly interfaces
Ping
Radar-like expanding effect with opacity fade.Wiggle
Side-to-side shaking motion.Flip
3D flip animation along the Y-axis.Heartbeat
Double-pulse animation mimicking a heartbeat.Shake
Horizontal shaking motion.Swing
Pendulum-like swinging motion.Tada
Celebration animation with scale and rotation.Rubber
Rubber band effect with elastic scaling.Entrance Animations
These animations play once when the component mounts, creating engaging entrance effects.Fade Animations
- Fade In
- Fade In Up
- Fade In Down
- Fade In Left
- Fade In Right
Scale Animations
Slide Animations
- Slide In Up
- Slide In Down
Special Effects
- Rotate In
- Zoom In
Combining Animations
You can combine entrance animations with main animations for rich effects:Animation Triggers
Control when animations play using thetrigger
prop:
- Always (Default)
- Hover
- Click
- Focus
Customizing Animation Timing
Fine-tune your animations with timing controls:Performance Considerations
All animations are optimized for performance:- CSS-based: Uses CSS transforms and opacity for smooth 60fps animations
- Hardware accelerated: Leverages GPU acceleration when available
- Reduced motion: Automatically respects
prefers-reduced-motion
setting - Efficient: Minimal impact on bundle size and runtime performance
Accessibility
Motion Icons React is built with accessibility in mind:- Animations are disabled when
prefers-reduced-motion: reduce
is set - All animations maintain proper focus management
- Screen readers announce icon changes appropriately
- Keyboard navigation works seamlessly with animated icons
Pro tip: Use subtle animations like
pulse
for continuous effects and save dramatic animations like tada
for special moments like success states.