@googleforcreators/animation package provides a comprehensive animation system for Web Stories. It supports both Web Animations API (WAAPI) for modern browsers and AMP animations for AMP-compatible output.
Installation
Quick Start
Components
AnimationProvider
Provides animation context to child components:WAAPIWrapper
Wraps elements with Web Animations API support:AMPWrapper
Wraps elements for AMP-compatible animations:AMPAnimations
Generates AMP animation definitions:AMPKeyframes
Generates AMP keyframe definitions:Animation Effects
The library provides numerous pre-built animation effects:Entrance Effects
- Fade In
- Fly In
- Drop
- Zoom
More Effects
Background Animations
Special animations for background elements:- Background Zoom
- Background Pan
- Pan and Zoom
Animation Parts
Create custom animations using animation parts:Available Animation Parts
- BlinkOn - Blinking effect
- Bounce - Bouncing motion
- Fade - Opacity transition
- Flip - 3D flip effect
- FloatOn - Floating appearance
- Move - Position translation
- Pulse - Scaling pulse
- Spin - Rotation effect
- Zoom - Scale effect