```
-Variables make compositions reusable as [templates](/guides/templates) -- the same composition can render different content by injecting variable values at render time.
+Variables make compositions reusable as [templates](/templates) -- the same composition can render different content by injecting variable values at render time.
## Listing Compositions
@@ -152,7 +152,7 @@ npx hyperframes compositions
Add animations to your compositions with GSAP timelines
-
+
Start from built-in templates for common video patterns
diff --git a/docs/docs.json b/docs/docs.json
index 6deb4074fc..c8a1633b05 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -36,7 +36,7 @@
"groups": [
{
"group": "Getting Started",
- "pages": ["introduction", "quickstart"]
+ "pages": ["introduction", "quickstart", "templates"]
},
{
"group": "Concepts",
@@ -51,7 +51,6 @@
"group": "Guides",
"pages": [
"guides/gsap-animation",
- "guides/templates",
"guides/rendering",
"guides/common-mistakes",
"guides/troubleshooting"
diff --git a/docs/guides/templates.mdx b/docs/guides/templates.mdx
deleted file mode 100644
index 4bd8bf1c3d..0000000000
--- a/docs/guides/templates.mdx
+++ /dev/null
@@ -1,215 +0,0 @@
----
-title: Templates
-description: "Built-in templates for common video patterns."
----
-
-Hyperframes includes starter templates to help you scaffold compositions quickly. Each template gives you a working project with the correct [composition structure](/concepts/compositions), [data attributes](/concepts/data-attributes), and a [GSAP timeline](/guides/gsap-animation) already wired up.
-
-## Using Templates
-
-```bash Terminal
-npx hyperframes init --template
-```
-
-This creates a new project directory with an `index.html` composition, sub-compositions, and any required assets.
-
-You can also run `npx hyperframes init` without `--template` to choose interactively.
-
-## Available Templates
-
-
-
- ### blank
-
- An empty composition with just the scaffolding — a video element, audio track, captions sub-composition, and an empty GSAP timeline. Start from scratch.
-
- **What it produces:** A minimal project with a single video clip and audio, ready for you to customize. The timeline is registered and ready for you to add tweens.
-
- **When to use it:** You have a specific design in mind and want full control. Good for AI agent workflows that will generate the composition programmatically, or when starting from a source video.
-
- ```bash Terminal
- npx hyperframes init my-video --template blank
- ```
-
- **What you get:**
- ```
- my-video/
- ├── meta.json
- ├── index.html
- └── compositions/
- └── captions.html
- ```
-
-
- ### warm-grain
-
- A cream-toned aesthetic with grain texture overlay. Warm, organic feel suited for lifestyle and branding videos.
-
- **What it produces:** A composition with warm color grading, textured grain, and smooth transitions. Includes an intro sub-composition and captions support.
-
- **When to use it:** You want an organic, stylized look for branding, lifestyle, or editorial content.
-
- ```bash Terminal
- npx hyperframes init my-video --template warm-grain
- ```
-
- **What you get:**
- ```
- my-video/
- ├── meta.json
- ├── index.html
- ├── compositions/
- │ ├── intro.html
- │ ├── graphics.html
- │ └── captions.html
- └── assets/
- ```
-
-
- ### play-mode
-
- Playful elastic animations with bold, energetic motion.
-
- **What it produces:** A composition with bouncy, elastic animation curves and dynamic layout transitions. Includes intro, stats, and captions sub-compositions.
-
- **When to use it:** You want a fun, high-energy feel — great for social media, product launches, or explainer videos.
-
- ```bash Terminal
- npx hyperframes init my-video --template play-mode
- ```
-
- **What you get:**
- ```
- my-video/
- ├── meta.json
- ├── index.html
- ├── compositions/
- │ ├── intro.html
- │ ├── stats.html
- │ └── captions.html
- └── assets/
- ```
-
-
- ### swiss-grid
-
- Structured grid layout inspired by Swiss/International Typographic Style.
-
- **What it produces:** A clean, grid-based composition with precise typography and structured layouts. Includes intro, graphics, and captions sub-compositions.
-
- **When to use it:** You want a clean, professional, information-dense layout — ideal for corporate videos, data presentations, or technical content.
-
- ```bash Terminal
- npx hyperframes init my-video --template swiss-grid
- ```
-
- **What you get:**
- ```
- my-video/
- ├── meta.json
- ├── index.html
- ├── compositions/
- │ ├── intro.html
- │ ├── graphics.html
- │ └── captions.html
- └── assets/
- ```
-
-
- ### vignelli
-
- Bold typography with red accents, inspired by Massimo Vignelli's design philosophy.
-
- **What it produces:** A striking composition with strong typographic hierarchy, red accent colors, and confident transitions. Includes overlays and captions sub-compositions.
-
- **When to use it:** You want a bold, authoritative visual style — great for headlines, announcements, or editorial content.
-
- ```bash Terminal
- npx hyperframes init my-video --template vignelli
- ```
-
- **What you get:**
- ```
- my-video/
- ├── meta.json
- ├── index.html
- ├── compositions/
- │ ├── overlays.html
- │ └── captions.html
- └── assets/
- ```
-
-
-
-## Choosing a Template
-
-| Template | Style | Best for |
-|----------|-------|----------|
-| `blank` | Minimal scaffolding | Full control, agent-generated, starting from video |
-| `warm-grain` | Organic, textured | Lifestyle, branding, editorial |
-| `play-mode` | Energetic, elastic | Social media, product launches |
-| `swiss-grid` | Clean, structured | Corporate, data, technical |
-| `vignelli` | Bold, typographic | Headlines, announcements |
-
-
- If you are new to Hyperframes, start with `warm-grain` or `play-mode` to see working animations and sub-compositions in action. Use `blank` when you want minimal scaffolding and full control. Run `npx hyperframes init` without `--template` to preview all options interactively.
-
-
-## Passing a Source Video
-
-You can initialize a project with your own video file using the `--video` flag:
-
-```bash Terminal
-npx hyperframes init my-video --template warm-grain --video ./my-clip.mp4
-```
-
-The CLI will probe the video for duration, resolution, and codec. If the video uses an incompatible codec (not H.264, VP8/9, AV1, or Theora), it will be automatically transcoded to H.264 MP4 if FFmpeg is available.
-
-## Custom Templates
-
-Any directory with an `index.html` can serve as a template. You can copy a directory manually or build your own init workflow.
-
-Your custom template needs:
-
-1. An `index.html` with a [`data-composition-id`](/concepts/data-attributes#composition-attributes) root element
-2. A [GSAP timeline](/guides/gsap-animation) registered in `window.__timelines`
-3. Any assets in the same directory or a subdirectory
-
-```html index.html
-
-
-
-
-
-
-
-```
-
-After creating a custom template, validate it with the [linter](/packages/cli#lint):
-
-```bash Terminal
-npx hyperframes lint
-```
-
-## Next Steps
-
-
-
- Create, preview, and render your first video
-
-
- Add animations to your template
-
-
- Understand the composition data model
-
-
- Render your composition to MP4
-
-
diff --git a/docs/guides/troubleshooting.mdx b/docs/guides/troubleshooting.mdx
index 85504eaa9c..a9757db3ef 100644
--- a/docs/guides/troubleshooting.mdx
+++ b/docs/guides/troubleshooting.mdx
@@ -9,7 +9,7 @@ If your issue is about a specific coding mistake (animations not working, video
Your directory needs an `index.html` with a valid [composition](/concepts/compositions). The root element must have a [`data-composition-id`](/concepts/data-attributes#composition-attributes) attribute.
- **Fix:** Run `npx hyperframes init` to create a composition from a [template](/guides/templates), or verify your `index.html` has the correct structure:
+ **Fix:** Run `npx hyperframes init` to create a composition from a [template](/templates), or verify your `index.html` has the correct structure:
```html index.html
Start the development server with live hot reload:
@@ -172,7 +172,7 @@ This is suppressed in CI environments, non-TTY shells, and when `HYPERFRAMES_NO_
After scaffolding, the CLI installs AI coding skills for Claude Code, Gemini CLI, and Codex CLI (use `--skip-skills` to disable). See [`skills`](#skills) command.
- See [Templates](/guides/templates) for full details.
+ See [Templates](/templates) for full details.
### `compositions`
diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx
index e8805b4a66..c92732e1b7 100644
--- a/docs/quickstart.mdx
+++ b/docs/quickstart.mdx
@@ -68,7 +68,7 @@ A 1920x1080 video with an animated title that fades in from above — rendered t
npx hyperframes init my-video --non-interactive --template blank
```
- See [Templates](/guides/templates) for all available templates.
+ See [Templates](/templates) for all available templates.
This generates a project structure like:
@@ -183,7 +183,7 @@ A 1920x1080 video with an animated title that fades in from above — rendered t
Add fade, slide, scale, and custom animations to your videos
-
+
Start from built-in templates like Warm Grain and Swiss Grid
diff --git a/docs/snippets/TemplateCard.jsx b/docs/snippets/TemplateCard.jsx
new file mode 100644
index 0000000000..b14b6bc082
--- /dev/null
+++ b/docs/snippets/TemplateCard.jsx
@@ -0,0 +1,59 @@
+export function TemplateCard({ id, title, description, href, portrait }) {
+ const [hovering, setHovering] = React.useState(false);
+
+ const imgSrc = `/images/templates/${id}.png`;
+ const videoSrc = `/images/templates/${id}.mp4`;
+
+ return (
+ setHovering(true)}
+ onMouseLeave={() => setHovering(false)}
+ >
+