Structure
Every composition needs a root element withdata-composition-id:
index.html
index.html file is the top-level composition. It can contain nested compositions within it. Any composition can be imported into another — there is no special “root” type.
Clip Types
A clip is any discrete block on the timeline, represented as an HTML element with data attributes:<video>— Video clips, B-roll, A-roll<img>— Static images, overlays<audio>— Music, sound effects<div data-composition-id="...">— Nested compositions (animations, grouped sequences)
Nested Compositions
You can embed one composition inside another in two ways: loading from an external file or defining it inline. External files are the recommended approach for reusable compositions.- External file
- Inline
Reference another HTML file with Each external composition file wraps its content in a
data-composition-src. The framework automatically fetches the file, extracts the <template> content, mounts it, executes scripts, and registers the timeline.index.html
<template> tag:compositions/intro-anim.html
Project Structure
project
index.html
compositions
intro-anim.html
caption-overlay.html
outro-title.html
assets
Two Layers: Primitives and Scripts
Every composition has two layers:- HTML — primitive clips (
video,img,audio, nested compositions). The declarative structure: what plays, when, and on which track. Controlled by data attributes. - Script — effects, transitions, dynamic DOM, canvas, SVG — creative animation via GSAP. Scripts do not control media playback or clip visibility.
Variables
Compositions can expose variables for dynamic content:compositions/card.html
Listing Compositions
Use the CLI to see all compositions in a project:Next Steps
Data Attributes
Full reference for timing, media, and composition attributes
GSAP Animation
Add animations to your compositions with GSAP timelines
Templates
Start from built-in templates for common video patterns
HTML Schema Reference
Complete schema for authoring compositions