Documentation

Animation Guide

Hovue icons come with built-in animations that bring your interface to life. This guide covers all available animation types and how to customize them.

Animation Types

Hovue supports five animation types, each designed for different use cases:

Slide

The slide animation moves the icon in a direction. Perfect for arrows and navigation elements.

<HoArrowRight
  animation="slide"
  :animation-duration="300"
/>

Bounce

The bounce animation creates a playful bounce effect. Great for success states and attention-grabbing elements.

<HoCheck
  animation="bounce"
  :animation-duration="400"
/>

Rotate

The rotate animation spins the icon. Ideal for loading states and refresh indicators.

<HoRefresh
  animation="rotate"
  :animation-duration="1000"
/>

Pulse

The pulse animation creates a subtle pulsing effect. Perfect for notifications and alerts.

<HoBell
  animation="pulse"
  :animation-duration="1500"
/>

Fade

The fade animation creates a smooth fade in/out effect. Great for transitions and state changes.

<HoHeart
  animation="fade"
  :animation-duration="500"
/>

Animation Duration

Control the speed of animations using the animation-duration prop. Duration is specified in milliseconds.

// Fast animation (200ms)
<HoArrowRight :animation-duration="200" />

// Medium animation (300ms - default)
<HoArrowRight :animation-duration="300" />

// Slow animation (600ms)
<HoArrowRight :animation-duration="600" />

Triggering Animations

On Hover

Animations can be triggered on hover by default:

<HoArrowRight
  animation="slide"
/>

On Click

Trigger animations programmatically on click:

<HoRefresh
  animation="rotate"
  @click="triggerAnimation"
/>

Conditional Animations

Use animations conditionally based on state:

<HoLoader
  :animation="isLoading ? 'rotate' : 'none'"
/>

Best Practices

  • Use appropriate animations: Match animation types to the icon's purpose (e.g., rotate for loaders, slide for arrows).
  • Keep durations reasonable: 200-600ms is usually ideal. Too fast feels jarring, too slow feels sluggish.
  • Don't overuse: Too many animated icons can be distracting. Use animations strategically.
  • Consider accessibility: Respect prefers-reduced-motion when possible.

Examples

Check out the Examples Gallery to see animations in action.