Quick start
Animation approaches
- DOM animations
- Canvas animations
Animate React components using inline styles and the
useVideoFrame hook:Animation helpers
Helios provides utility functions for common animation patterns:Sequencing components
Sequence component
Create time-based sequences that show/hide content:components/Sequence.tsx
Series component
Automatically sequence child components one after another:components/Series.tsx
Frame context
Create a context for sharing frame state:components/FrameContext.tsx
Usage example
Best practices
Initialize Helios outside components
Initialize Helios outside components
Create the Helios instance outside your component to avoid recreating it on every render:
Bind to document timeline
Bind to document timeline
Always call
bindToDocumentTimeline() to enable external control by the player or renderer:Expose helios for debugging
Expose helios for debugging
Attach the Helios instance to
window for easy debugging and player integration:Use strict mode carefully
Use strict mode carefully
React 18+ Strict Mode causes double-mounting in development. This is fine for Helios, but be aware of potential duplicate subscriptions during development.
TypeScript support
Helios is written in TypeScript and provides full type definitions:Next steps
Animation helpers
Learn about interpolation, spring physics, and easing functions
Canvas rendering
Create high-performance canvas animations
Sequences
Build complex multi-scene animations
Export videos
Render your animations to video files