animate() function with an array of animation steps.
Sequence Syntax
Timelines are defined as an array of animation segments:AnimationSequence
An array of segments, where each segment is:Basic Usage
Simple Sequence
With Options
Parallel Animations
Useat option to control timing:
Timing Control
Absolute Time
Relative Time
Start with Previous
Offset from Previous Start
Labels
Named Time Points
Labels with Offset
Label Objects
Sequence Options
Default Transitions
Total Duration
Examples
Stagger Effect
Loading Animation
Entrance Sequence
Card Flip Sequence
Text Animation
Progress Steps
Scroll Reveal with Timeline
Gallery Transition
Menu Animation
Advanced Usage
Motion Value Animation
Callback Segments
Mixed Animations
Looped Sequence
Playback Controls
Sequences return the same controls as regular animations:Performance Tips
- Prefer transform properties (x, y, scale, rotate) for GPU acceleration
- Use labels for complex timing instead of calculating offsets
- Batch similar animations to start at the same time using
at: "<" - Limit concurrent animations to maintain 60fps
- Use
defaultTransitionto reduce repetition
Timing Reference
| Syntax | Meaning | Example |
|---|---|---|
number | Absolute time in seconds | at: 2 |
"<" | Start of previous animation | at: "<" |
"+number" | Relative to previous end | at: "+0.5" |
"-number" | Before previous end | at: "-0.2" |
"<+number" | After previous start | at: "<+0.3" |
"<-number" | Before previous start | at: "<-0.1" |
"label" | At named label | at: "start" |
"label+number" | After label | at: "start+0.5" |
Browser Support
- Works in all modern browsers
- Uses optimized animation scheduling
- Falls back gracefully for unsupported features
- Fully compatible with Motion’s animation engine