0Pricing
Angular Academy · Lesson

Keyframes and Staggering

Create complex, staggered animations.

Multi-Step Animations

Simple transitions go from A to B. For multi-step motion (bounce, pulse, color sweep) Angular offers keyframes, and for animating many items in sequence it offers stagger.

The keyframes Function

keyframes takes an array of style steps, each with an offset from 0 to 1 marking its position along the duration.

animate('1s', keyframes([
  style({ opacity: 0, offset: 0 }),
  style({ opacity: 0.5, offset: 0.3 }),
  style({ opacity: 1, offset: 1 })
]))

All lessons in this course

  1. Animation Basics: trigger and state
  2. Transitions and Timing
  3. Enter and Leave Animations
  4. Keyframes and Staggering
← Back to Angular Academy