Use Animations

Master all animation types and easing functions

Use Animations

Learn how to bring your videos to life with animations.

Animation Types

Fade Animations

Fade elements in and out:

{
  "animations": [
    { "type": "fadeIn", "duration": 0.5 },
    { "type": "fadeOut", "duration": 0.5, "delay": 4.5 }
  ]
}
TypeDescription
fadeInFade from transparent to visible
fadeOutFade from visible to transparent

Slide Animations

Slide elements from a direction:

{
  "animations": [
    { "type": "slideIn", "direction": "up", "duration": 0.8 },
    { "type": "slideOut", "direction": "right", "duration": 0.5 }
  ]
}
DirectionEffect
upFrom bottom to position
downFrom top to position
leftFrom right to position
rightFrom left to position

Zoom Animations

Scale elements in and out:

{
  "animations": [
    { "type": "zoomIn", "duration": 0.5 },
    { "type": "zoomOut", "duration": 0.5 }
  ]
}

Custom Animations

Animate specific properties:

Scale Animation

{
  "animations": [
    { "type": "scale", "from": 1, "to": 1.2, "duration": 5 }
  ]
}

Great for Ken Burns effect on images.

Move Animation

{
  "animations": [
    { "type": "move", "from": { "x": 0, "y": 0 }, "to": { "x": 100, "y": 50 }, "duration": 3 }
  ]
}

Rotate Animation

{
  "animations": [
    { "type": "rotate", "from": 0, "to": 360, "duration": 2, "loop": true }
  ]
}

Easing Functions

Control the timing and feel of animations:

{
  "animations": [
    { "type": "zoomIn", "duration": 0.5, "easing": "easeOutBack" }
  ]
}

Available Easing Functions

EasingDescriptionBest For
linearConstant speedRotation, continuous motion
easeInSineSlow startNatural deceleration
easeOutSineSlow endNatural acceleration
easeInOutSineSlow start and endSmooth transitions
easeInQuadQuadratic accelerationBuilding momentum
easeOutQuadQuadratic decelerationSettling into place
easeInOutQuadSmooth quad curveGeneral purpose
easeInCubicCubic accelerationStrong buildup
easeOutCubicCubic decelerationSoft landing
easeInBackPull back before startAnticipation
easeOutBackOvershoot then settleBouncy feel
easeInOutBackBack easing both waysPlayful motion
easeInElasticElastic startCartoon style
easeOutElasticElastic endBouncy landing
easeInBounceBouncing startPlayful entrance
easeOutBounceBouncing endNatural physics

Animation Properties

Duration

Animation length in seconds:

{ "duration": 0.5 }

Delay

Wait before starting (seconds):

{ "delay": 1.0 }

Loop

Repeat the animation:

{ "loop": true }        // Infinite loop
{ "loop": 3 }           // Loop 3 times

Combining Animations

Multiple animations run simultaneously:

{
  "animations": [
    { "type": "fadeIn", "duration": 0.5 },
    { "type": "slideIn", "direction": "up", "duration": 0.8 },
    { "type": "scale", "from": 0.8, "to": 1, "duration": 0.5 }
  ]
}

Keyframe Animation

For precise control, use keyframes:

{
  "keyframes": [
    {
      "property": "opacity",
      "frames": [
        { "time": 0, "value": 0 },
        { "time": 005, "value": 1, "easing": "easeOutCubic" },
        { "time": 4.5, "value": 1 },
        { "time": 5, "value": 0, "easing": "easeInCubic" }
      ]
    }
  ]
}

Common Patterns

Impactful Entrance

{
  "animations": [
    { "type": "zoomIn", "duration": 0.5, "easing": "easeOutBack" },
    { "type": "fadeIn", "duration": 0.3 }
  ]
}

Ken Burns Effect

{
  "type": "image",
  "animations": [
    { "type": "scale", "from": 1, "to": 1.1, "duration": 5 },
    { "type": "move", "from": { "x": 0, "y": 0 }, "to": { "x": 50, "y": 30 }, "duration": 5 }
  ]
}

Staggered List

{
  "clips": [
    { "text": "Item 1", "start": 0, "animations": [{ "type": "fadeIn", "duration": 0.3 }] },
    { "text": "Item 2", "start": 0.2, "animations": [{ "type": "fadeIn", "duration": 0.3 }] },
    { "text": "Item 3", "start": 0.4, "animations": [{ "type": "fadeIn", "duration": 0.3 }] }
  ]
}

Pulse Effect

{
  "animations": [
    { "type": "scale", "from": 1, "to": 1.05, "duration": 0.5, "loop": true, "easing": "easeInOutSine" }
  ]
}

Best Practices

  1. Keep it subtle: Animations should enhance, not distract
  2. Consistent timing: Use similar durations across elements
  3. Stagger elements: Don't animate everything at once
  4. Match the mood: Animations should fit the content's tone
  5. Performance: Limit simultaneous animations on mobile

Next Steps