Skip to content

🎥 Make videos programmatically with React

Skills: Refine connected composition guidance

JonnyBurgera6a57bb4ccf7
diff --git a/packages/skills/skills/remotion-markup/compositions.md b/packages/skills/skills/remotion-markup/compositions.md
index e3a090c32b..8c65180332 100644
--- a/packages/skills/skills/remotion-markup/compositions.md
+++ b/packages/skills/skills/remotion-markup/compositions.md
@@ -107,12 +107,14 @@ Use [`calculateMetadata`](./calculate-metadata.md) to make dimensions, duration,
## Nesting compositions within another
To render a composition's component inside another composition, use `<Sequence>` with `width` and `height` when the nested content needs its own dimensions.
-When the nested scene should have its own editable Studio timeline, use the [connected composition structure](connected-compositions.md): the sequence directly renders the same component that is registered as a `<Composition>` in the root.
+
+When the nested scene should have its own editable Studio timeline, use the [connected composition structure](connected-compositions.md).
```tsx
-<AbsoluteFill>
- <Sequence width={COMPOSITION_WIDTH} height={COMPOSITION_HEIGHT}>
- <CompositionComponent />
+<>
+ <Video src="https://remotion.media/video.mp4" />
+ <Sequence width={1920} height={1080}>
+ <OverlayComponent />
</Sequence>
-</AbsoluteFill>
+</>
```
diff --git a/packages/skills/skills/remotion-markup/connected-compositions.md b/packages/skills/skills/remotion-markup/connected-compositions.md
index 644edd83b4..3ddb0c5c9b 100644
--- a/packages/skills/skills/remotion-markup/connected-compositions.md
+++ b/packages/skills/skills/remotion-markup/connected-compositions.md
@@ -1,22 +1,11 @@
----
-name: connected-compositions
-description: Structure scenes as connected compositions for editing in Remotion Studio
-metadata:
- tags: composition, scene, sequence, studio, precompose
----
-
# Connected compositions
-A connected composition gives a scene or group of layers its own Studio timeline, like a precomposition in After Effects. The parent renders the scene component directly; the separate `<Composition>` registration makes that same component available for focused editing and navigation. It does not render an intermediate video file.
-
-## When to use this structure
+Using the connected compositions pattern, a group of layers can get their own Studio timeline, like a precomposition in After Effects.
-Prefer a 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. This is the default structure for substantial scenes in a multi-scene video. Keep small, one-off elements in the parent timeline when a separate composition would add navigation without making editing easier.
-
-## Markup pattern
+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. Put the scene's markup in a named React component. Multiple internal layers and sequences can live inside it.
-2. Render exactly one direct instance of that component inside a `<Sequence>`, `<Series.Sequence>`, or `<TransitionSeries.Sequence>` in the parent. Give the sequence a descriptive `name` and explicit timing.
+2. Render exactly one direct instance of that component inside a `<Sequence>`, `<Series.Sequence>`, or `<TransitionSeries.Sequence>` in the parent.
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.
```tsx
@@ -55,8 +44,9 @@ export const RemotionRoot = () => (
);
```
-Use the same direct-child pattern with `<TransitionSeries.Sequence>` when the scenes have transitions. Use `<Sequence>` for an independently positioned scene or group. A connected scene can contain many elements; only its parent sequence needs a single direct child.
-
-The connection requires the direct child to be the registered component itself. A fragment, DOM wrapper, multiple children, or a different wrapper component between the sequence and that component prevents the match. If several compositions register the same component, Studio finds several connections; give a scene one composition registration when you want double-click to open it directly.
+Studio replaces the layers with a reference to the connected composition in the timeline.
+Double-clicking a sequence with one connected composition opens it at the corresponding frame.
+Editing the shared component changes both views.
-Studio shows the connected composition on the parent timeline and in the sequence inspector. Double-clicking a sequence with one connected composition opens it at the corresponding frame. Editing the shared component changes both views. 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.
+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.