Skip to content

🎥 Make videos programmatically with React

template-helloworld: Make title and logo editable in Studio

JonnyBurger02168c2792a4
diff --git a/packages/template-helloworld/src/Root.tsx b/packages/template-helloworld/src/Root.tsx
index 3de2c529f4..b48475c477 100644
--- a/packages/template-helloworld/src/Root.tsx
+++ b/packages/template-helloworld/src/Root.tsx
@@ -1,4 +1,4 @@
-import { Composition } from "remotion";
+import { Composition, Folder } from "remotion";
import { HelloWorld } from "./HelloWorld";
import { Logo } from "./HelloWorld/Logo";
import { Title } from "./HelloWorld/Title";
@@ -25,31 +25,32 @@ export const RemotionRoot: React.FC = () => {
}}
/>
- {/* Mount any React component to make it show up in the sidebar and work on it individually! */}
- <Composition
- id="OnlyLogo"
- component={Logo}
- durationInFrames={150}
- fps={30}
- width={1920}
- height={1080}
- defaultProps={{
- logoColor1: "#91EAE4",
- logoColor2: "#86A8E7",
- }}
- />
- <Composition
- id="Title"
- component={Title}
- durationInFrames={115}
- fps={30}
- width={1920}
- height={1080}
- defaultProps={{
- titleText: "Welcome to Remotion",
- titleColor: "#000000",
- }}
- />
+ <Folder name="Elements">
+ <Composition
+ id="Logo"
+ component={Logo}
+ durationInFrames={150}
+ fps={30}
+ width={1920}
+ height={1080}
+ defaultProps={{
+ logoColor1: "#91EAE4",
+ logoColor2: "#86A8E7",
+ }}
+ />
+ <Composition
+ id="Title"
+ component={Title}
+ durationInFrames={115}
+ fps={30}
+ width={1920}
+ height={1080}
+ defaultProps={{
+ titleText: "Welcome to Remotion",
+ titleColor: "#000000",
+ }}
+ />
+ </Folder>
</>
);
};