Skip to content

🎥 Make videos programmatically with React

Skills: Lead with Track and connected composition examples

JonnyBurger3a88d0b8f0a1
diff --git a/.agents/skills/remotion-new-markup/SKILL.md b/.agents/skills/remotion-new-markup/SKILL.md
index 7ca83d98f6..e199f14eb1 100644
--- a/.agents/skills/remotion-new-markup/SKILL.md
+++ b/.agents/skills/remotion-new-markup/SKILL.md
@@ -1,104 +1,16 @@
---
name: remotion-new-markup
-description: Write or refactor Remotion markup using components that inherit timing props and managed absolute-fill layouts. Use when choosing scene wrappers, replacing redundant Sequence or AbsoluteFill components, or reducing unnecessary Studio timeline layers.
+description: Write or refactor Remotion markup with Track, connected compositions, and Interactive.create using explicit absolute-fill or none layouts.
---
-# New Remotion Markup
+# New Remotion markup
-Design timeline rows around editable content, not the DOM tree. Give each scene,
-text item, media clip, or meaningful group one interactive owner. Use plain HTML
-for layout-only containers and fragments for wrappers with no remaining purpose.
+Follow the complete [Track + connected compositions example](../../../packages/skills/skills/remotion-interactivity/timeline-structure.md).
-Read the public [Timeline structure guide](../../../packages/skills/skills/remotion-interactivity/timeline-structure.md)
-for reusable text components, custom transition wrappers, and the layout checks
-needed when refactoring. Keep reusable guidance there so it also ships with the
-public markup and interactivity skills.
+- Put successive scenes in a named `Track`, with `from` and `durationInFrames` directly on each instance.
+- Create scenes with `Interactive.create({layout: 'absolute-fill'})`; return a fragment inside and put instance styles on the exported component.
+- Create bounded elements with `Interactive.create({layout: 'none'})`; forward `style` to a plain root.
+- Register the same exported scene and reusable element components as connected compositions, with inline metadata and representative `defaultProps`.
+- Keep each independently editable instance as its own JSX node. Use plain HTML for layout-only containers.
-## Put timing on the content component
-
-Discourage direct use of `<Sequence>` in new markup. It provides timing
-primitives that other components should inherit, rather than requiring an
-additional wrapper around the content.
-
-Use built-in interactive components, media components that support timing, or
-custom components created with `Interactive.create()`.
-Pass `from`, `durationInFrames`, `trimBefore`, `playbackRate`, and
-`name` directly to the component that supports them.
-
-Avoid wrapping one timing-aware component in a `<Sequence>` just to schedule
-or name it. For custom components, prefer adding timing through
-`Interactive.create()` instead of introducing another sequence at each
-call site. Keep a direct `<Sequence>` only when a necessary timing boundary
-cannot be expressed by the content components. Specialized containers such as
-`<TransitionSeries.Sequence>` still serve their own sequencing behavior.
-
-When removing an existing wrapper, preserve its timing, dimensions, and
-premount behavior. Account for any timing already on the child; do not overwrite
-it or apply offsets twice. Preserve the distinction between the component's
-local frame and animation expressions evaluated in its parent.
-
-## Group related items on the same timeline row
-
-Use `<Track>` or `<TransitionSeries>` for items that logically belong on the
-same row in the Studio timeline, such as successive scenes or clips in the
-same content layer.
-
-Use `<Track>` for items with their own timing that do not overlap. Use
-`<TransitionSeries>` for sequential scenes with transitions between them;
-it automatically places its scenes on the same timeline row. Keep unrelated
-content layers on separate rows.
-
-Give media clips in a `<Track>` explicit `durationInFrames` values based on
-their verified source lengths, trims, and playback rates. Studio can treat an
-unbounded clip as lasting to the end of its parent rather than using the source
-file's duration, causing an overlap error even when the source files do not overlap.
-
-## Use a managed full-size layout
-
-Discourage `<AbsoluteFill>` as a scene or component wrapper. It often creates
-an additional timeline layer that does not represent useful content. Prefer
-`Interactive.create()` with
-`layout: 'absolute-fill'`: the full-size container shares the component's
-timeline item.
-
-The inner component can return a fragment. Put instance styles, timing,
-`width`, and `height` on the exported interactive component. Do not
-declare `style`, `width`, or `height` props on the inner component when using
-this layout; the wrapper owns them.
-
-```tsx
-import {Interactive, useVideoConfig} from 'remotion';
-
-const SceneInner = ({title}: {readonly title: string}) => (
- <>
- <Interactive.H1 name="Title" style={{color: 'white', fontSize: 80}}>
- {title}
- </Interactive.H1>
- </>
-);
-
-export const Scene = Interactive.create({
- Component: SceneInner,
- schema: {
- title: {type: 'string', default: '', description: 'Title'},
- ...Interactive.backgroundSchema,
- },
- layout: 'absolute-fill',
-});
-
-export const MyVideo = () => {
- const {fps} = useVideoConfig();
-
- return <Scene name="Opening scene" from={fps} durationInFrames={3 * fps} title="A new perspective" style={{backgroundColor: '#111111'}} />;
-};
-```
-
-The managed container clips overflow by default. Use
-`style={{overflow: 'visible'}}` on the exported component when needed. Keep
-additional layout containers only when they provide useful alignment, clipping,
-or grouping that the managed root does not supply. Components with their own
-bounds, such as text boxes or SVGs, can use the default `layout: 'none'` and
-forward `style` to their visual root.
-
-For further guidance, see [Remotion Interactivity](../remotion-interactivity/SKILL.md)
-and the [Interactive.create() API](../../../packages/docs/docs/interactive-create.mdx).
+Use `TransitionSeries` when scenes overlap through transitions. Preserve its specialized sequence boundaries. Avoid extra `Sequence` and `AbsoluteFill` wrappers.
diff --git a/packages/skills/skills/remotion-interactivity/SKILL.md b/packages/skills/skills/remotion-interactivity/SKILL.md
index d9180b5909..b8b5d56314 100644
--- a/packages/skills/skills/remotion-interactivity/SKILL.md
+++ b/packages/skills/skills/remotion-interactivity/SKILL.md
@@ -15,66 +15,33 @@ If the markup is too complex for the Studio to make it interactive, then the val
## Prefer interactive components with their own timelines
-Design the timeline around meaningful editable content: scenes, text, media,
-and groups that move together. Give each such item one interactive owner.
-Layout-only containers should be plain HTML, and wrappers that do nothing
-should be fragments. Do not make every DOM node a timeline item.
+Build new compositions with `Track`, connected compositions, and
+`Interactive.create()`. Set `layout` explicitly to `'absolute-fill'` for scenes
+or `'none'` for bounded elements. Register the same exported scene and reusable
+element components with `Composition`.
-Use `Interactive.create({layout: 'absolute-fill'})` for components that fill their parent. The wrapper provides their visual root and timeline item, and clips overflow by default, so the inner component can return a fragment. Put timing, dimensions, and per-instance styles on the exported component.
+Start with the complete [Track + connected compositions example](timeline-structure.md).
+It includes the element, scene, parent timeline, and root registrations.
-Keep visuals that belong together in the same component, so they move and trim together. An inner layout container can still provide alignment, clipping within a smaller area, or an animated group; a container that only fills the scene is usually unnecessary. Cards, text boxes, and SVGs with their own bounds can keep the default `layout: 'none'` and forward `style` to their visual root.
+```tsx title="MyVideo.tsx"
+import {Track, useVideoConfig} from 'remotion';
+import {Chapter} from './Chapter';
-For reusable text components, layout-only groups, and migrations from nested
-`Sequence` and `AbsoluteFill` wrappers, read
-[Timeline structure](timeline-structure.md). It covers choosing the interactive
-owner and preserving the rendered layout while simplifying the timeline.
+export const MyVideo = () => {
+ const {fps} = useVideoConfig();
-```tsx title="Scene.tsx"
-import {Video} from '@remotion/media';
-import type React from 'react';
-import {Interactive, type InteractivitySchema} from 'remotion';
-
-type SceneProps = {
- readonly title: string;
-};
-
-const SceneInner: React.FC<SceneProps> = ({title}) => {
return (
- <>
- <Video
- name="Background footage"
- src="https://remotion.media/video.mp4"
- objectFit="cover"
- style={{width: '100%', height: '100%'}}
- />
- <Interactive.Div
- name="Scene title"
- style={{
- position: 'absolute',
- left: 80,
- bottom: 80,
- color: 'white',
- fontFamily: 'Helvetica, Arial, sans-serif',
- fontSize: 80,
- }}
- >
- {title}
- </Interactive.Div>
- </>
+ <Track name="Chapters">
+ <Chapter name="Opening" durationInFrames={3 * fps} title="Introduction" />
+ <Chapter name="Feature" from={3 * fps} durationInFrames={4 * fps} title="New features" />
+ </Track>
);
};
-
-const sceneSchema = {
- title: {type: 'string', default: '', description: 'Title'},
-} as const satisfies InteractivitySchema;
-
-export const Scene = Interactive.create({
- Component: SceneInner,
- schema: sceneSchema,
- layout: 'absolute-fill',
-});
```
+Put background and alignment styles on each scene instance, as shown in the
+complete example. Keep layout-only containers as plain HTML.
+
### Choose schema fields
Each key in the schema is a prop that Studio can read and edit at the call site.
@@ -127,33 +94,37 @@ See [`InteractivitySchema`](https://www.remotion.dev/docs/interactivity-schema)
### Register reusable components as connected compositions
-Register substantial scenes and reusable components with their own layers or
-animation as standalone compositions. Studio calls these **connected
-compositions**: they can be opened in their own timeline while sharing the same
-component implementation with the parent video.
+Register scenes and reusable elements as standalone compositions. Studio calls
+these **connected compositions**: they can be opened in their own timeline while
+sharing the same component implementation with the parent video.
Define required styles and load fonts inside the component so it works without
its parent. See
[parent independence](../remotion-markup/connected-compositions.md#make-the-component-independent-of-its-parent).
Register the same exported component reference that the parent renders. For the
-example above, use `component={Scene}`, not `SceneInner` or an inline wrapper.
+example above, use `component={Chapter}`, not `ChapterInner` or an inline wrapper.
`Interactive.create()` provides the sequence, so no extra `<Sequence>` is needed for the connection.
```tsx title="src/Root.tsx"
import {Composition} from 'remotion';
-import {Scene} from './Scene';
+import {Chapter} from './Chapter';
export const RemotionRoot = () => (
<Composition
- id="Scene"
- component={Scene}
+ id="Chapter"
+ component={Chapter}
width={1280}
height={720}
fps={30}
- durationInFrames={30}
+ durationInFrames={90}
defaultProps={{
title: 'A new perspective',
+ style: {
+ backgroundColor: '#111111',
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
}}
/>
);
@@ -173,7 +144,7 @@ props. Built-in interactive components and custom components made with
`trimBefore`, and `playbackRate` directly.
```tsx
-<Scene
+<Chapter
name="Opening scene"
from={30}
durationInFrames={90}
@@ -188,11 +159,10 @@ A `useCurrentFrame()` call inside the component reads its local frame, while a
style expression at the call site still uses the caller's frame. Preserve that
distinction when moving animation styles.
-Keep a `<Sequence>` when it provides shared timing for multiple siblings,
-wraps a component that does not handle timing, or supplies dimensions the child
-cannot accept directly. Managed roots also accept `width` and `height` for
-`useVideoConfig()`. Keep `<TransitionSeries.Sequence>` for consecutive layout,
-with or without transitions; direct `from` props do not replace those behaviors.
+For shared scene timing, group the content in a component made with
+`Interactive.create()` and time that instance. Managed roots also accept
+`width` and `height` for `useVideoConfig()`. Use `Track` for successive scenes;
+keep `<TransitionSeries.Sequence>` when using `TransitionSeries` for transitions.
## Give every independently editable item its own JSX node
@@ -208,16 +178,12 @@ and custom components.
For example, author an editable timeline like this:
```tsx title="Separate source nodes"
-import { TransitionSeries } from "@remotion/transitions";
-
-<TransitionSeries>
- <TransitionSeries.Sequence name="Introduction" durationInFrames={90}>
- <Introduction />
- </TransitionSeries.Sequence>
- <TransitionSeries.Sequence name="Demo" durationInFrames={150}>
- <Demo />
- </TransitionSeries.Sequence>
-</TransitionSeries>
+import { Track } from "remotion";
+
+<Track name="Scenes">
+ <Introduction name="Introduction" durationInFrames={90} />
+ <Demo name="Demo" from={90} durationInFrames={150} />
+</Track>
```
A `.map()` or another programmatic loop would create multiple runtime items
diff --git a/packages/skills/skills/remotion-interactivity/timeline-structure.md b/packages/skills/skills/remotion-interactivity/timeline-structure.md
index 32dd766b65..2c45d766e3 100644
--- a/packages/skills/skills/remotion-interactivity/timeline-structure.md
+++ b/packages/skills/skills/remotion-interactivity/timeline-structure.md
@@ -1,56 +1,27 @@
-# Timeline structure
-
-Use timeline rows for content the user can meaningfully select, move, trim, or
-style. A scene can contain separate text and media items, but its alignment
-wrappers and decorative primitives do not each need a row.
-
-## Choose one interactive owner per item
-
-| Purpose | Preferred structure |
-| ------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
-| Full-size scene or content group | `Interactive.create({layout: 'absolute-fill'})`, with a fragment inside |
-| Reusable text, card, or SVG with its own bounds | `Interactive.create({layout: 'none'})`, forwarding `style` to a plain visual root |
-| Individual text or graphic authored directly in a scene | A named `Interactive.H1`, `Interactive.P`, `Interactive.Div`, or appropriate media component |
-| Alignment, mask, or clipping inside an item | Plain `div`, `span`, or SVG element |
-| Wrapper with no layout, timing, or grouping purpose | Fragment or remove it |
-| Successive non-overlapping scenes or clips | Named `Track` with timing directly on each child |
-| Scenes joined by transitions | `TransitionSeries` with its specialized sequence boundaries |
-
-Do not wrap a timing-aware component in `Sequence` just to schedule or name it.
-Do not put an `Interactive.Div` around a media component just to position or
-scale it when the media component accepts those styles directly.
-
-Use named interactive groups for content that should move together, such as a
-foreground group or a wall of repeated text. Use plain elements for repeated
-primitives that are intentionally edited as part of that group, such as rings,
-particles, or individual animated letters. Keep separate JSX nodes for items
-that need independent editing.
-
-## Reusable text owns its row and controls
-
-An `Interactive.create()` text component already owns a timeline item. Its
-inner root should normally be a plain `span`, `p`, or `div`, not another
-interactive component representing the same text.
-
-Expose content and typography on that owner. `Interactive.textSchema` supplies
-typography controls; use `Interactive.childrenSchema` for React-node children
-or an explicit string field for string-only text. Forward instance styles to
-the visual root with `layout: 'none'`.
-
-```tsx
+# Track + connected compositions
+
+Use this structure for new compositions: a named `Track`, directly timed scene
+instances, and connected compositions made with `Interactive.create()`. Set
+`layout` explicitly: `'absolute-fill'` for scenes, `'none'` for bounded elements.
+
+## 1. A bounded element: `layout: 'none'`
+
+Forward `style` to a plain root. The custom component already owns its timeline row.
+
+```tsx title="Title.tsx"
import type React from 'react';
import {Interactive} from 'remotion';
-const LabelInner = ({
+const TitleInner = ({
text,
style,
}: {
readonly text: string;
readonly style?: React.CSSProperties;
-}) => <span style={{display: 'inline-block', ...style}}>{text}</span>;
+}) => <h1 style={{margin: 0, ...style}}>{text}</h1>;
-export const Label = Interactive.create({
- Component: LabelInner,
+export const Title = Interactive.create({
+ Component: TitleInner,
layout: 'none',
schema: {
...Interactive.textSchema,
@@ -59,60 +30,148 @@ export const Label = Interactive.create({
});
```
-At the call site, keep the name, timing, text, and editable styles inline:
+## 2. A scene: `layout: 'absolute-fill'`
-```tsx
-<Label
- name="Chapter title"
- from={30}
- durationInFrames={90}
- text="A new perspective"
- style={{fontSize: 80, fontWeight: 700, color: 'white'}}
-/>
+Return a fragment. Put the background and alignment on the scene instance.
+The managed root handles `style`, `width`, and `height`; do not forward them inside.
+
+```tsx title="Chapter.tsx"
+import {Interactive} from 'remotion';
+import {Title} from './Title';
+
+const ChapterInner = ({title}: {readonly title: string}) => (
+ <>
+ <Title
+ name="Chapter title"
+ text={title}
+ style={{
+ color: 'white',
+ fontFamily: 'Arial, sans-serif',
+ fontSize: 96,
+ fontWeight: 700,
+ }}
+ />
+ </>
+);
+
+export const Chapter = Interactive.create({
+ Component: ChapterInner,
+ layout: 'absolute-fill',
+ schema: {
+ ...Interactive.backgroundSchema,
+ title: {type: 'string', default: '', description: 'Title'},
+ },
+});
+```
+
+## 3. The parent: `Track` + direct timing
+
+Write each instance separately, with inline names, timing, props, and styles.
+Do not add `Sequence` or `AbsoluteFill` wrappers.
+
+```tsx title="MyVideo.tsx"
+import {Track, useVideoConfig} from 'remotion';
+import {Chapter} from './Chapter';
+
+export const MyVideo = () => {
+ const {fps} = useVideoConfig();
+
+ return (
+ <Track name="Chapters">
+ <Chapter
+ name="Opening"
+ durationInFrames={3 * fps}
+ title="Introduction"
+ style={{
+ backgroundColor: '#111111',
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}
+ />
+ <Chapter
+ name="Feature"
+ from={3 * fps}
+ durationInFrames={4 * fps}
+ title="New features"
+ style={{
+ backgroundColor: '#243b53',
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}
+ />
+ </Track>
+ );
+};
```
-## Managed scene roots own layout
-
-With `layout: 'absolute-fill'`, put instance `style`, `width`, and `height` on
-the exported component. Do not declare or forward those props in its inner
-component: the managed container owns them. Return a fragment unless an inner
-container has an additional layout or grouping purpose.
-
-Put editable scene backgrounds and alignment on the scene instance. Expose the
-relevant schema fragments, such as `Interactive.backgroundSchema`. When the
-scene is also a connected composition, register the same exported component
-and provide equivalent inline `defaultProps` for its standalone appearance.
-Registration defaults do not automatically apply to instances in the parent.
-
-Custom transition presentations have a different owner: the transition
-boundary already supplies their timing. Use plain positioned elements for
-their masks and panels, and fragments for roots that only group children.
-Adding interactive wrappers for those implementation details clutters the
-timeline. Keep `TransitionSeries.Sequence` and its premounting behavior.
-
-## Preserve behavior when removing wrappers
-
-Wrapper removal changes CSS and frame contexts unless their responsibilities
-are deliberately transferred:
-
-- Move timing and names to the content owner without double-applying child
- offsets. Preserve local-frame animation semantics, dimensions, premounting,
- and transition overlap.
-- Managed full-size roots clip overflow by default. Set
- `style={{overflow: 'visible'}}` where the old root allowed overflow.
-- Preserve flex direction explicitly. `AbsoluteFill` uses a column, while a
- managed root does not imply that direction. This can change image sizing and
- child alignment even when both roots fill the same area.
-- Preserve explicit width and height, percentage offsets, transform origins,
- and positioning contexts. In particular, a full-height container with
- `top: '50%'` is not equivalent to one stretched between that top and bottom.
-- Check paint order after removing positioned wrappers. Text may need its own
- positioning to remain above absolutely positioned decoration.
-- Keep inherited typography, background, and font loading available when a
- component is opened as a standalone connected composition.
-
-Compare representative frames before and after, including scene and transition
-boundaries. Inspect the Studio timeline for meaningful names and redundant
-rows, and verify that text and style controls still target the intended item.
-Investigate visual differences; do not dismiss them as harmless unless their
-cause is understood, such as existing wall-clock-driven animation.
+## 4. Connect the same exported components
+
+Register the scenes and reusable elements alongside the parent. Use the same
+component references and give each registration usable inline defaults.
+
+```tsx title="Root.tsx"
+import {Composition, Folder} from 'remotion';
+import {Chapter} from './Chapter';
+import {MyVideo} from './MyVideo';
+import {Title} from './Title';
+
+export const RemotionRoot = () => (
+ <>
+ <Composition
+ id="MyVideo"
+ component={MyVideo}
+ width={1920}
+ height={1080}
+ fps={30}
+ durationInFrames={210}
+ />
+ <Folder name="Scenes">
+ <Composition
+ id="Chapter"
+ component={Chapter}
+ width={1920}
+ height={1080}
+ fps={30}
+ durationInFrames={90}
+ defaultProps={{
+ title: 'Introduction',
+ style: {
+ backgroundColor: '#111111',
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ }}
+ />
+ </Folder>
+ <Folder name="Elements">
+ <Composition
+ id="Title"
+ component={Title}
+ width={1920}
+ height={1080}
+ fps={30}
+ durationInFrames={90}
+ defaultProps={{
+ text: 'Introduction',
+ style: {
+ color: 'white',
+ fontFamily: 'Arial, sans-serif',
+ fontSize: 96,
+ fontWeight: 700,
+ },
+ }}
+ />
+ </Folder>
+ </>
+);
+```
+
+Double-click a chapter in the parent timeline to edit its connected composition.
+
+For overlapping scene transitions, replace `Track` with
+[`TransitionSeries`](../remotion-markup/transitions.md) and keep its specialized
+sequence boundaries. Use plain HTML for layout-only masks and panels.
+
+When refactoring, preserve timing and premounting. Match clipping, flex direction,
+positioning, and paint order; managed roots clip by default. Compare representative
+frames and open each connected composition on its own.
diff --git a/packages/skills/skills/remotion-markup/SKILL.md b/packages/skills/skills/remotion-markup/SKILL.md
index 5201d7688b..3222e5048b 100644
--- a/packages/skills/skills/remotion-markup/SKILL.md
+++ b/packages/skills/skills/remotion-markup/SKILL.md
@@ -27,16 +27,13 @@ Tailwind animation class will not render correctly, they need to be refactored.
Use `Easing.bezier()` and `Easing.spring()` to customize timing.
-Structure your markup according to [Remotion Interactivity Best Practices](../remotion-interactivity/SKILL.md).
-Prefer `Interactive.create({layout: 'absolute-fill'})`
-for scenes with editable props. Their inner markup can return a fragment; the
-wrapper handles layout and instance styles. Sized elements such as lower thirds
-can keep the default layout and forward `style` to their own root. Register
-reusable scenes as connected compositions.
-Put timing directly on components that support it; avoid redundant `<Sequence>` wrappers.
-Give each editable item one interactive owner; use plain HTML for layout-only
-containers. When choosing wrappers or refactoring an existing composition, read
-[Timeline structure](../remotion-interactivity/timeline-structure.md).
+Use `Track` for successive scenes. Make scenes and reusable elements with
+`Interactive.create()`, setting `layout` explicitly to `'absolute-fill'` or
+`'none'`, and register them as connected compositions. Put timing directly on
+each instance. Follow the complete
+[Track + connected compositions example](../remotion-interactivity/timeline-structure.md).
+See [Remotion Interactivity](../remotion-interactivity/SKILL.md) for editable props
+and keyframes.
The Studio edits the JSX source node that created an item. Author every composition registration, clip, scene, layer and sequence that should be editable independently as its own JSX node, with its editable props inline.
Programmatic loops are suitable when the generated instances are intentionally controlled as one source template, not when users need to edit the instances
@@ -143,10 +140,10 @@ The fade-in is keyframed inline at the call site.
```tsx
// MyScene.tsx
import { Video } from "@remotion/media";
-import { Easing, interpolate, useCurrentFrame, useVideoConfig } from "remotion";
+import { Easing, Interactive, interpolate, useCurrentFrame, useVideoConfig } from "remotion";
import { LowerThird } from "./LowerThird";
-export const MyScene = () => {
+const MySceneInner = () => {
const { fps } = useVideoConfig();
const frame = useCurrentFrame();
@@ -179,6 +176,11 @@ export const MyScene = () => {
</>
);
};
+
+export const MyScene = Interactive.create({
+ Component: MySceneInner,
+ layout: "absolute-fill",
+});
```
```tsx
@@ -241,6 +243,7 @@ const lowerThirdSchema = {
export const LowerThird = Interactive.create({
Component: LowerThirdInner,
+ layout: "none",
schema: lowerThirdSchema,
});
```
diff --git a/packages/skills/skills/remotion-markup/connected-compositions.md b/packages/skills/skills/remotion-markup/connected-compositions.md
index b551d3a4b9..acf7b1d577 100644
--- a/packages/skills/skills/remotion-markup/connected-compositions.md
+++ b/packages/skills/skills/remotion-markup/connected-compositions.md
@@ -1,144 +1,23 @@
# Connected compositions
-Using the connected compositions pattern, a group of layers can get their own Studio timeline, like a precomposition in After Effects.
+Make every scene and reusable element a connected composition:
-Use connected composition when a section has its own layers or timing, will be reused, or would be easier to edit and preview on its own.
+1. Export it with `Interactive.create()`. Set `layout: 'absolute-fill'` for a scene or `layout: 'none'` for a bounded element.
+2. Render the exported component directly inside a named `Track`, with inline timing and props.
+3. Register that same reference in `<Composition component={...}>`, alongside the parent video. Keep metadata and representative `defaultProps` inline.
-1. Put the scene's markup in a named React component.
- Multiple internal layers and sequences can live inside it.
+Follow the complete [Track + connected compositions example](../remotion-interactivity/timeline-structure.md), including `Title.tsx`, `Chapter.tsx`, `MyVideo.tsx`, and `Root.tsx`.
-2. Prefer making the component interactive with `Interactive.create({layout: 'absolute-fill'})`, following [Remotion Interactivity](../remotion-interactivity/SKILL.md).
- Render the exported component directly in the parent with inline timing and editable props.
- It does not need an additional `<Sequence>` to connect to its registration.
- For consecutive scenes or transitions, render one direct instance as the only child of a `<TransitionSeries.Sequence>`.
-3. Register the **same component reference** with `<Composition component={...}>` in the root.
- Give it a unique `id` and the dimensions, fps, and natural duration needed to preview the scene on its own. A `<Folder>` can keep scene compositions together.
+Double-clicking an instance opens its connected composition. Editing the shared
+component updates both views. Registration defaults do not automatically apply
+to the instances in the parent.
## Make the component independent of its parent
-The parent is not mounted when a connected composition opens on its own.
-Define required styles such as `fontFamily` inside the component, and avoid
-parent-only context providers or mount side effects. Load custom fonts in its
-module or a shared module it imports; see [Google fonts](google-fonts.md) and
-[local fonts](local-fonts.md).
+The parent is not mounted when the connected composition opens on its own.
+Keep required typography in the component and supply background and alignment
+in its inline registration defaults. Load fonts in its module or an imported
+shared module; see [Google fonts](google-fonts.md) and [local fonts](local-fonts.md).
-When extracting markup, carry over these dependencies. Verify its appearance
-by opening it directly in a fresh Studio preview before opening the parent.
-
-## Example
-
-```tsx
-// Chapter.tsx
-import type React from 'react';
-import {
- AbsoluteFill,
- Interactive,
- interpolate,
- useCurrentFrame,
- type InteractivitySchema,
-} from 'remotion';
-
-type ChapterProps = {
- readonly title: string;
-};
-
-const ChapterInner: React.FC<ChapterProps> = ({title}) => {
- // Frame 0 is the start of this chapter, wherever the parent places it.
- const frame = useCurrentFrame();
-
- return (
- <AbsoluteFill
- name="Chapter background"
- style={{
- justifyContent: 'center',
- alignItems: 'center',
- backgroundColor: 'white',
- color: 'black',
- fontFamily: 'Helvetica, Arial, sans-serif',
- }}
- >
- <h1
- style={{
- fontSize: 96,
- opacity: interpolate(frame, [0, 20], [0, 1], {
- extrapolateRight: 'clamp',
- }),
- }}
- >
- {title}
- </h1>
- </AbsoluteFill>
- );
-};
-
-const chapterSchema = {
- title: {type: 'string', default: '', description: 'Title'},
-} as const satisfies InteractivitySchema;
-
-export const Chapter = Interactive.create({
- Component: ChapterInner,
- schema: chapterSchema,
- layout: 'absolute-fill',
-});
-```
-
-`ChapterInner` only declares `title`. The Chapter background layer exposes the centering and background styles in the timeline; the wrapper handles instance styles and timing.
-Because `Interactive.create()` always wraps the component in a sequence, the exported `Chapter` additionally accepts the timing props of a `<Sequence>`: `from`, `durationInFrames`, `trimBefore`, `playbackRate`, `loop`, `freeze`, `hidden`, `name` and `showInTimeline`, plus `premountFor`, `postmountFor` and crop props.
-These are handled by the wrapper and are not passed to `ChapterInner`.
-See [Prefer interactive components with their own timelines](../remotion-interactivity/SKILL.md#prefer-interactive-components-with-their-own-timelines).
-
-```tsx
-// MyVideo.tsx
-import {Chapter} from './Chapter';
-
-export const MyVideo = () => (
- <>
- <Chapter name="Opening" durationInFrames={90} title="Introduction" />
- <Chapter
- name="Feature"
- from={90}
- durationInFrames={120}
- title="New features"
- />
- </>
-);
-```
-
-```tsx title="src/Root.tsx"
-import {Composition, Folder} from 'remotion';
-import {MyVideo} from './MyVideo';
-import {Chapter} from './Chapter';
-
-export const RemotionRoot = () => (
- <>
- <Folder name="MyVideo-Scenes">
- <Composition
- id="Chapter"
- component={Chapter}
- width={1920}
- height={1080}
- fps={30}
- durationInFrames={120}
- defaultProps={{title: 'Introduction'}}
- />
- </Folder>
- <Composition
- id="MyVideo"
- component={MyVideo}
- width={1920}
- height={1080}
- fps={30}
- durationInFrames={210}
- />
- </>
-);
-```
-
-Studio replaces the layers with a reference to the connected composition in the timeline.
-Double-clicking a timeline item with one connected composition opens it at the corresponding frame.
-Editing the shared component changes both views.
-
-Example: If user has `MyVideo` selected, they can see 2 layers in the timeline, and can double-click one to go to the `Chapter` composition.
-
-If the scene takes props, pass the intended values in the parent and use matching `defaultProps` on its standalone registration; registration does not automatically copy the parent's props.
-Keep scene and parent fps and dimensions aligned unless their difference is intentional.
+Verify the component by opening its standalone composition. Keep its fps and
+dimensions consistent with the parent unless a difference is intentional.
diff --git a/packages/skills/skills/remotion-markup/multi-scene-video.md b/packages/skills/skills/remotion-markup/multi-scene-video.md
index c256d27f67..64ce911292 100644
--- a/packages/skills/skills/remotion-markup/multi-scene-video.md
+++ b/packages/skills/skills/remotion-markup/multi-scene-video.md
@@ -1,102 +1,32 @@
# Multi-scene videos
-Put each substantial scene in its own component and file.
-Register those components as [connected compositions](connected-compositions.md) so each scene has an editable Studio timeline.
+Put successive scenes in a named `Track`. Make each scene with
+`Interactive.create({layout: 'absolute-fill'})` and register it as a connected
+composition. Write each instance separately with inline timing and props.
-Treat the parent timeline as an editable document: Author every scene that
-should be edited independently as a separate interactive component
-or `<TransitionSeries.Sequence>` JSX node. Keep its `name` and
-`durationInFrames` inline so the node has its own source-editing target.
-Programmatic rendering is suitable only when the generated scenes are
-intentionally controlled as one source template.
-
-Use `<TransitionSeries>` when the scenes may have transitions.
-Install `@remotion/transitions` if it is missing.
-Give each sequence an inline `durationInFrames` value so Studio can edit its timing.
-
-Example:
-
-```tsx
-// MyVideo.tsx
-import {TransitionSeries} from '@remotion/transitions';
+```tsx title="MyVideo.tsx"
+import {Track, useVideoConfig} from 'remotion';
import {OpeningScene} from './OpeningScene';
import {FeatureScene} from './FeatureScene';
export const MyVideo = () => {
+ const {fps} = useVideoConfig();
+
return (
- <TransitionSeries>
- <TransitionSeries.Sequence
- name="Opening"
- durationInFrames={90}
- >
- <OpeningScene />
- </TransitionSeries.Sequence>
- <TransitionSeries.Sequence
- name="Feature"
- durationInFrames={120}
- >
- <FeatureScene />
- </TransitionSeries.Sequence>
- </TransitionSeries>
+ <Track name="Scenes">
+ <OpeningScene name="Opening" durationInFrames={3 * fps} />
+ <FeatureScene name="Feature" from={3 * fps} durationInFrames={4 * fps} />
+ </Track>
);
};
```
-Register the same scene components, plus the parent video, in the root:
-
-```tsx title="src/Root.tsx"
-import {Composition, Folder} from 'remotion';
-import {OpeningScene} from './OpeningScene';
-import {FeatureScene} from './FeatureScene';
-import {ChapterElement} from './ChapterElement';
-import {MyVideo} from './MyVideo';
-
-export const RemotionRoot = () => (
- <>
- <Folder name="Elements">
- <Composition
- id="ChapterElement"
- component={ChapterElement}
- width={1920}
- height={1080}
- fps={30}
- durationInFrames={60}
- />
- </Folder>
- <Folder name="Scenes">
- <Composition
- id="Opening"
- component={OpeningScene}
- width={1920}
- height={1080}
- fps={30}
- durationInFrames={90}
- />
- <Composition
- id="Feature"
- component={FeatureScene}
- width={1920}
- height={1080}
- fps={30}
- durationInFrames={120}
- />
- </Folder>
- <Composition
- id="MyVideo"
- component={MyVideo}
- width={1920}
- height={1080}
- fps={30}
- durationInFrames={210}
- />
- </>
-);
-```
-
-Keep each scene's standalone metadata and `defaultProps` consistent with how it is used in the main video.
-
-With no transition, this example needs a 210-frame main composition.
-If you add a transition, account for its overlap in the main duration; see [transitions](transitions.md).
+Follow the complete [Track + connected compositions example](../remotion-interactivity/timeline-structure.md)
+for scene definitions and `Root.tsx`. Register `OpeningScene`, `FeatureScene`,
+and `MyVideo` using those same exported component references, with representative
+inline defaults. At 30 fps, this parent lasts 210 frames.
-Use `<TransitionSeries>` for consecutive scenes that do not need transitions.
-For independently placed scenes, prefer components made with `Interactive.create()` and put `from` and `durationInFrames` directly on each instance.
+When adding overlapping transitions, use
+[`TransitionSeries`](transitions.md) instead of `Track`. Keep each scene as the
+only child of its `TransitionSeries.Sequence`, and subtract transition overlaps
+from the parent duration.