Skip to content

🎥 Make videos programmatically with React

Docs: Replace Sequence wrappers in code examples

Jonny Burger46d3beab95c3
diff --git a/packages/docs/docs/codemods/create-element.mdx b/packages/docs/docs/codemods/create-element.mdx
index 4db51ea581..5b6232bc4b 100644
--- a/packages/docs/docs/codemods/create-element.mdx
+++ b/packages/docs/docs/codemods/create-element.mdx
@@ -23,19 +23,19 @@ const solid = createElement({
props: {width: 1920, height: 1080, color: 'gray'},
});
-const sequence = createElement({
- component: 'Sequence',
+const htmlInCanvas = createElement({
+ component: 'HtmlInCanvas',
importPath: 'remotion',
- props: {from: 30, durationInFrames: 60},
+ props: {width: 1920, height: 1080, from: 30, durationInFrames: 60},
}).withChild(solid);
```
-Inserting `sequence` produces the following JSX and adds `import {Sequence, Solid} from 'remotion'` if the imports are missing:
+Inserting `htmlInCanvas` produces the following JSX and adds `import {HtmlInCanvas, Solid} from 'remotion'` if the imports are missing:
```tsx title="Generated JSX"
-<Sequence from={30} durationInFrames={60}>
+<HtmlInCanvas width={1920} height={1080} from={30} durationInFrames={60}>
<Solid width={1920} height={1080} color="gray" />
-</Sequence>
+</HtmlInCanvas>
```
An element is a description, not source code. Imports, local names, and formatting are decided when the element is inserted into a file. If the file already declares a binding with the same name, the import is aliased, for example `import {Solid as Solid2} from 'remotion'`.
diff --git a/packages/docs/docs/export-opentimeline.mdx b/packages/docs/docs/export-opentimeline.mdx
index 597ae0f570..70e469f923 100644
--- a/packages/docs/docs/export-opentimeline.mdx
+++ b/packages/docs/docs/export-opentimeline.mdx
@@ -274,10 +274,13 @@ Write one video track and one audio track unless the composition clearly needs m
The example maps to this composition at 30fps:
-```tsx
-<Sequence from={30} durationInFrames={150}>
- <Video src={staticFile("interview.mp4")} trimBefore={60} />
-</Sequence>
+```tsx title="MyComposition.tsx"
+<Video
+ src={staticFile("interview.mp4")}
+ from={30}
+ durationInFrames={150}
+ trimBefore={60}
+/>
<Audio src={staticFile("music.mp3")} />
```