Skip to content

🎥 Make videos programmatically with React

add javascript template to monorepo

Jonny Burger77ca114baf62
diff --git a/packages/create-video/src/add-tailwind.ts b/packages/create-video/src/add-tailwind.ts
index 9690515cc2..22fa074ab0 100644
--- a/packages/create-video/src/add-tailwind.ts
+++ b/packages/create-video/src/add-tailwind.ts
@@ -19,7 +19,7 @@ export const addTailwindConfigJs = (projectRoot: string) => {
tailwindConfigFile,
`/* eslint-env node */
module.exports = {
- content: ["./src/**/*.{ts,tsx}"],
+ content: ["./src/**/*.{ts,tsx,js,jsx}"],
theme: {
extend: {},
},
@@ -30,10 +30,13 @@ module.exports = {
};
export const addTailwindRootCss = (projectRoot: string) => {
- const rootFile = path.join(projectRoot, 'src', 'Root.tsx');
+ const rootFileTsx = path.join(projectRoot, 'src', 'Root.tsx');
+ const rootFileJsx = path.join(projectRoot, 'src', 'Root.jsx');
+
+ const rootFile = fs.existsSync(rootFileTsx) ? rootFileTsx : rootFileJsx;
if (!fs.existsSync(rootFile)) {
- throw new Error('No Root.tsx file found');
+ throw new Error('No Root file found');
}
const root = fs.readFileSync(rootFile, 'utf-8');
@@ -43,7 +46,10 @@ export const addTailwindRootCss = (projectRoot: string) => {
};
export const addTailwindToConfig = (projectRoot: string) => {
- const configFile = path.join(projectRoot, 'remotion.config.ts');
+ const configFileTs = path.join(projectRoot, 'remotion.config.ts');
+ const configFileJs = path.join(projectRoot, 'remotion.config.js');
+
+ const configFile = fs.existsSync(configFileTs) ? configFileTs : configFileJs;
if (!fs.existsSync(configFile)) {
throw new Error('No remotion.config.ts file found');
diff --git a/packages/create-video/src/templates.tsx b/packages/create-video/src/templates.tsx
index 907cc3a4be..e39394d1ff 100644
--- a/packages/create-video/src/templates.tsx
+++ b/packages/create-video/src/templates.tsx
@@ -183,7 +183,7 @@ export const FEATURED_TEMPLATES: Template[] = [
previewURL:
'https://template-helloworld-javascript.vercel.app/?/HelloWorld',
templateInMonorepo: 'template-javascript',
- allowEnableTailwind: false,
+ allowEnableTailwind: true,
},
{
homePageLabel: 'Remix',
diff --git a/packages/template-javascript/.prettierrc b/packages/template-javascript/.prettierrc
index 842bfb78cb..37d5071748 100644
--- a/packages/template-javascript/.prettierrc
+++ b/packages/template-javascript/.prettierrc
@@ -1,13 +1,5 @@
{
- "singleQuote": true,
- "bracketSpacing": false,
- "useTabs": true,
- "overrides": [
- {
- "files": ["*.yml"],
- "options": {
- "singleQuote": false
- }
- }
- ]
+ "useTabs": false,
+ "bracketSpacing": true,
+ "tabWidth": 2
}
diff --git a/packages/template-javascript/package.json b/packages/template-javascript/package.json
index c017a8cb5f..3c64960335 100644
--- a/packages/template-javascript/package.json
+++ b/packages/template-javascript/package.json
@@ -1,24 +1,24 @@
{
- "name": "template-javascript",
- "version": "1.0.0",
- "description": "My Remotion video",
- "scripts": {
- "start": "remotion studio",
- "build": "remotion render HelloWorld out/video.mp4",
- "upgrade": "remotion upgrade",
- "test": "eslint src --ext ts,tsx,js,jsx"
- },
- "repository": {},
- "license": "UNLICENSED",
- "dependencies": {
- "@remotion/cli": "workspace:*",
- "react": "18.3.1",
- "react-dom": "18.3.1",
- "remotion": "workspace:*",
- "zod": "3.22.3"
- },
- "devDependencies": {
- "prettier": "3.2.5"
- },
- "private": true
+ "name": "template-javascript",
+ "version": "1.0.0",
+ "description": "My Remotion video",
+ "scripts": {
+ "start": "remotion studio",
+ "build": "remotion render HelloWorld out/video.mp4",
+ "upgrade": "remotion upgrade",
+ "test": "eslint src --ext ts,tsx,js,jsx"
+ },
+ "repository": {},
+ "license": "UNLICENSED",
+ "dependencies": {
+ "@remotion/cli": "workspace:*",
+ "react": "18.3.1",
+ "react-dom": "18.3.1",
+ "remotion": "workspace:*",
+ "zod": "3.22.3"
+ },
+ "devDependencies": {
+ "prettier": "3.2.5"
+ },
+ "private": true
}
diff --git a/packages/template-javascript/remotion.config.js b/packages/template-javascript/remotion.config.js
index 38db4bfd3c..35886becc0 100644
--- a/packages/template-javascript/remotion.config.js
+++ b/packages/template-javascript/remotion.config.js
@@ -3,6 +3,6 @@
// Note: When using the Node.JS APIs, the config file doesn't apply. Instead, pass options directly to the APIs
-import {Config} from '@remotion/cli/config';
+import { Config } from "@remotion/cli/config";
-Config.setVideoImageFormat('jpeg');
+Config.setVideoImageFormat("jpeg");
diff --git a/packages/template-javascript/src/HelloWorld/Arc.jsx b/packages/template-javascript/src/HelloWorld/Arc.jsx
index 0bbd147cba..64d3f859db 100644
--- a/packages/template-javascript/src/HelloWorld/Arc.jsx
+++ b/packages/template-javascript/src/HelloWorld/Arc.jsx
@@ -1,9 +1,9 @@
-import {useState} from 'react';
-import {random, useVideoConfig} from 'remotion';
-import {COLOR_1, COLOR_2} from './constants';
+import { useState } from "react";
+import { random, useVideoConfig } from "remotion";
+import { COLOR_1, COLOR_2 } from "./constants";
const getCircumferenceOfArc = (rx, ry) => {
- return Math.PI * 2 * Math.sqrt((rx * rx + ry * ry) / 2);
+ return Math.PI * 2 * Math.sqrt((rx * rx + ry * ry) / 2);
};
const rx = 135;
@@ -13,38 +13,38 @@ const cy = 540;
const arcLength = getCircumferenceOfArc(rx, ry);
const strokeWidth = 30;
-export const Arc = ({progress, rotation, rotateProgress}) => {
- const {width, height} = useVideoConfig();
+export const Arc = ({ progress, rotation, rotateProgress }) => {
+ const { width, height } = useVideoConfig();
- // Each svg Id must be unique to not conflict with each other
- const [gradientId] = useState(() => String(random(null)));
+ // Each svg Id must be unique to not conflict with each other
+ const [gradientId] = useState(() => String(random(null)));
- return (
- <svg
- viewBox={`0 0 ${width} ${height}`}
- style={{
- position: 'absolute',
- transform: `rotate(${rotation * rotateProgress}deg)`,
- }}
- >
- <defs>
- <linearGradient id={gradientId} x1="0%" y1="0%" x2="0%" y2="100%">
- <stop offset="0%" stopColor={COLOR_1} />
- <stop offset="100%" stopColor={COLOR_2} />
- </linearGradient>
- </defs>
- <ellipse
- cx={cx}
- cy={cy}
- rx={rx}
- ry={ry}
- fill="none"
- stroke={`url(#${gradientId})`}
- strokeDasharray={arcLength}
- strokeDashoffset={arcLength - arcLength * progress}
- strokeLinecap="round"
- strokeWidth={strokeWidth}
- />
- </svg>
- );
+ return (
+ <svg
+ viewBox={`0 0 ${width} ${height}`}
+ style={{
+ position: "absolute",
+ transform: `rotate(${rotation * rotateProgress}deg)`,
+ }}
+ >
+ <defs>
+ <linearGradient id={gradientId} x1="0%" y1="0%" x2="0%" y2="100%">
+ <stop offset="0%" stopColor={COLOR_1} />
+ <stop offset="100%" stopColor={COLOR_2} />
+ </linearGradient>
+ </defs>
+ <ellipse
+ cx={cx}
+ cy={cy}
+ rx={rx}
+ ry={ry}
+ fill="none"
+ stroke={`url(#${gradientId})`}
+ strokeDasharray={arcLength}
+ strokeDashoffset={arcLength - arcLength * progress}
+ strokeLinecap="round"
+ strokeWidth={strokeWidth}
+ />
+ </svg>
+ );
};
diff --git a/packages/template-javascript/src/HelloWorld/Atom.jsx b/packages/template-javascript/src/HelloWorld/Atom.jsx
index e49a577470..6fe1a6cce8 100644
--- a/packages/template-javascript/src/HelloWorld/Atom.jsx
+++ b/packages/template-javascript/src/HelloWorld/Atom.jsx
@@ -1,33 +1,33 @@
-import {useState} from 'react';
-import {random, useVideoConfig} from 'remotion';
-import {COLOR_1, COLOR_2} from './constants';
+import { useState } from "react";
+import { random, useVideoConfig } from "remotion";
+import { COLOR_1, COLOR_2 } from "./constants";
-export const Atom = ({scale}) => {
- const config = useVideoConfig();
+export const Atom = ({ scale }) => {
+ const config = useVideoConfig();
- // Each SVG ID must be unique to not conflict with each other
- const [gradientId] = useState(() => String(random(null)));
+ // Each SVG ID must be unique to not conflict with each other
+ const [gradientId] = useState(() => String(random(null)));
- return (
- <svg
- viewBox={`0 0 ${config.width} ${config.height}`}
- style={{
- position: 'absolute',
- transform: `scale(${scale})`,
- }}
- >
- <defs>
- <linearGradient id={gradientId} x1="0%" y1="0%" x2="100%" y2="0%">
- <stop offset="0%" stopColor={COLOR_1} />
- <stop offset="100%" stopColor={COLOR_2} />
- </linearGradient>
- </defs>
- <circle
- r={70}
- cx={config.width / 2}
- cy={config.height / 2}
- fill={`url(#${gradientId})`}
- />
- </svg>
- );
+ return (
+ <svg
+ viewBox={`0 0 ${config.width} ${config.height}`}
+ style={{
+ position: "absolute",
+ transform: `scale(${scale})`,
+ }}
+ >
+ <defs>
+ <linearGradient id={gradientId} x1="0%" y1="0%" x2="100%" y2="0%">
+ <stop offset="0%" stopColor={COLOR_1} />
+ <stop offset="100%" stopColor={COLOR_2} />
+ </linearGradient>
+ </defs>
+ <circle
+ r={70}
+ cx={config.width / 2}
+ cy={config.height / 2}
+ fill={`url(#${gradientId})`}
+ />
+ </svg>
+ );
};
diff --git a/packages/template-javascript/src/HelloWorld/Logo.jsx b/packages/template-javascript/src/HelloWorld/Logo.jsx
index 867cbf45a9..117d0e9774 100644
--- a/packages/template-javascript/src/HelloWorld/Logo.jsx
+++ b/packages/template-javascript/src/HelloWorld/Logo.jsx
@@ -1,71 +1,71 @@
import {
- AbsoluteFill,
- interpolate,
- spring,
- useCurrentFrame,
- useVideoConfig,
-} from 'remotion';
-import {Arc} from './Arc';
-import {Atom} from './Atom';
+ AbsoluteFill,
+ interpolate,
+ spring,
+ useCurrentFrame,
+ useVideoConfig,
+} from "remotion";
+import { Arc } from "./Arc";
+import { Atom } from "./Atom";
export const Logo = () => {
- const videoConfig = useVideoConfig();
- const frame = useCurrentFrame();
+ const videoConfig = useVideoConfig();
+ const frame = useCurrentFrame();
- const development = spring({
- config: {
- damping: 100,
- mass: 0.5,
- },
- fps: videoConfig.fps,
- frame,
- });
+ const development = spring({
+ config: {
+ damping: 100,
+ mass: 0.5,
+ },
+ fps: videoConfig.fps,
+ frame,
+ });
- const rotationDevelopment = spring({
- config: {
- damping: 100,
- mass: 0.5,
- },
- fps: videoConfig.fps,
- frame,
- });
+ const rotationDevelopment = spring({
+ config: {
+ damping: 100,
+ mass: 0.5,
+ },
+ fps: videoConfig.fps,
+ frame,
+ });
- const scale = spring({
- frame,
- config: {
- mass: 0.5,
- },
- fps: videoConfig.fps,
- });
+ const scale = spring({
+ frame,
+ config: {
+ mass: 0.5,
+ },
+ fps: videoConfig.fps,
+ });
- const logoRotation = interpolate(
- frame,
- [0, videoConfig.durationInFrames],
- [0, 360],
- );
+ const logoRotation = interpolate(
+ frame,
+ [0, videoConfig.durationInFrames],
+ [0, 360],
+ );
- return (
- <AbsoluteFill
- style={{
- transform: `scale(${scale}) rotate(${logoRotation}deg)`,
- }}
- >
- <Arc
- rotateProgress={rotationDevelopment}
- progress={development}
- rotation={30}
- />
- <Arc
- rotateProgress={rotationDevelopment}
- rotation={90}
- progress={development}
- />
- <Arc
- rotateProgress={rotationDevelopment}
- rotation={-30}
- progress={development}
- />
- <Atom scale={rotationDevelopment} />
- </AbsoluteFill>
- );
+ return (
+ <AbsoluteFill
+ style={{
+ transform: `scale(${scale}) rotate(${logoRotation}deg)`,
+ }}
+ >
+ <Arc
+ rotateProgress={rotationDevelopment}
+ progress={development}
+ rotation={30}
+ />
+ <Arc
+ rotateProgress={rotationDevelopment}
+ rotation={90}
+ progress={development}
+ />
+ <Arc
+ rotateProgress={rotationDevelopment}
+ rotation={-30}
+ progress={development}
+ />
+ <Atom scale={rotationDevelopment} />
+ </AbsoluteFill>
+ );
};
diff --git a/packages/template-javascript/src/HelloWorld/Subtitle.jsx b/packages/template-javascript/src/HelloWorld/Subtitle.jsx
index e648b06d8c..5880b10aab 100644
--- a/packages/template-javascript/src/HelloWorld/Subtitle.jsx
+++ b/packages/template-javascript/src/HelloWorld/Subtitle.jsx
@@ -1,26 +1,26 @@
-import React from 'react';
-import {interpolate, useCurrentFrame} from 'remotion';
-import {COLOR_1, FONT_FAMILY} from './constants';
+import React from "react";
+import { interpolate, useCurrentFrame } from "remotion";
+import { COLOR_1, FONT_FAMILY } from "./constants";
const subtitle = {
- fontFamily: FONT_FAMILY,
- fontSize: 40,
- textAlign: 'center',
- position: 'absolute',
- bottom: 140,
- width: '100%',
+ fontFamily: FONT_FAMILY,
+ fontSize: 40,
+ textAlign: "center",
+ position: "absolute",
+ bottom: 140,
+ width: "100%",
};
const codeStyle = {
- color: COLOR_1,
+ color: COLOR_1,
};
export const Subtitle = () => {
- const frame = useCurrentFrame();
- const opacity = interpolate(frame, [0, 30], [0, 1]);
- return (
- <div style={{...subtitle, opacity}}>
- Edit <code style={codeStyle}>src/Root.jsx</code> and save to reload.
- </div>
- );
+ const frame = useCurrentFrame();
+ const opacity = interpolate(frame, [0, 30], [0, 1]);
+ return (
+ <div style={{ ...subtitle, opacity }}>
+ Edit <code style={codeStyle}>src/Root.jsx</code> and save to reload.
+ </div>
+ );
};
diff --git a/packages/template-javascript/src/HelloWorld/Title.jsx b/packages/template-javascript/src/HelloWorld/Title.jsx
index 0bb50ec581..b07a7eead5 100644
--- a/packages/template-javascript/src/HelloWorld/Title.jsx
+++ b/packages/template-javascript/src/HelloWorld/Title.jsx
@@ -1,55 +1,55 @@
-import React from 'react';
-import {spring, useCurrentFrame, useVideoConfig} from 'remotion';
-import {FONT_FAMILY} from './constants';
+import React from "react";
+import { spring, useCurrentFrame, useVideoConfig } from "remotion";
+import { FONT_FAMILY } from "./constants";
const title = {
- fontFamily: FONT_FAMILY,
- fontWeight: 'bold',
- fontSize: 100,
- textAlign: 'center',
- position: 'absolute',
- bottom: 160,
- width: '100%',
+ fontFamily: FONT_FAMILY,
+ fontWeight: "bold",
+ fontSize: 100,
+ textAlign: "center",
+ position: "absolute",
+ bottom: 160,
+ width: "100%",
};
const word = {
- marginLeft: 10,
- marginRight: 10,
- display: 'inline-block',
+ marginLeft: 10,
+ marginRight: 10,
+ display: "inline-block",
};
-export const Title = ({titleText, titleColor}) => {
- const videoConfig = useVideoConfig();
- const frame = useCurrentFrame();
+export const Title = ({ titleText, titleColor }) => {
+ const videoConfig = useVideoConfig();
+ const frame = useCurrentFrame();
- const words = titleText.split(' ');
+ const words = titleText.split(" ");
- return (
- <h1 style={title}>
- {words.map((t, i) => {
- const delay = i * 5;
+ return (
+ <h1 style={title}>
+ {words.map((t, i) => {
+ const delay = i * 5;
- const scale = spring({
- fps: videoConfig.fps,
- frame: frame - delay,
- config: {
- damping: 200,
- },
- });
+ const scale = spring({
+ fps: videoConfig.fps,
+ frame: frame - delay,
+ config: {
+ damping: 200,
+ },
+ });
- return (
- <span
- key={t}
- style={{
- ...word,
- color: titleColor,
- transform: `scale(${scale})`,
- }}
- >
- {t}
- </span>
- );
- })}
- </h1>
- );
+ return (
+ <span
+ key={t}
+ style={{
+ ...word,
+ color: titleColor,
+ transform: `scale(${scale})`,
+ }}
+ >
+ {t}
+ </span>
+ );
+ })}
+ </h1>
+ );
};
diff --git a/packages/template-javascript/src/HelloWorld/constants.js b/packages/template-javascript/src/HelloWorld/constants.js
index 8c0fff4ca1..050c59d413 100644
--- a/packages/template-javascript/src/HelloWorld/constants.js
+++ b/packages/template-javascript/src/HelloWorld/constants.js
@@ -1,6 +1,6 @@
// Change any of these to update your video live.
-export const COLOR_1 = '#86A8E7';
-export const COLOR_2 = '#91EAE4';
+export const COLOR_1 = "#86A8E7";
+export const COLOR_2 = "#91EAE4";
-export const FONT_FAMILY = 'SF Pro Text, Helvetica, Arial, sans-serif';
+export const FONT_FAMILY = "SF Pro Text, Helvetica, Arial, sans-serif";
diff --git a/packages/template-javascript/src/HelloWorld/index.jsx b/packages/template-javascript/src/HelloWorld/index.jsx
index 06bef74950..6c6e31edbe 100644
--- a/packages/template-javascript/src/HelloWorld/index.jsx
+++ b/packages/template-javascript/src/HelloWorld/index.jsx
@@ -1,62 +1,62 @@
-import {spring} from 'remotion';
+import { spring } from "remotion";
import {
- AbsoluteFill,
- interpolate,
- Sequence,
- useCurrentFrame,
- useVideoConfig,
-} from 'remotion';
-import {Logo} from './Logo';
-import {Subtitle} from './Subtitle';
-import {Title} from './Title';
+ AbsoluteFill,
+ interpolate,
+ Sequence,
+ useCurrentFrame,
+ useVideoConfig,
+} from "remotion";
+import { Logo } from "./Logo";
+import { Subtitle } from "./Subtitle";
+import { Title } from "./Title";
-export const HelloWorld = ({titleText, titleColor}) => {
- const frame = useCurrentFrame();
- const {durationInFrames, fps} = useVideoConfig();
+export const HelloWorld = ({ titleText, titleColor }) => {
+ const frame = useCurrentFrame();
+ const { durationInFrames, fps } = useVideoConfig();
- // Animate from 0 to 1 after 25 frames
- const logoTranslationProgress = spring({
- frame: frame - 25,
- fps,
- config: {
- damping: 100,
- },
- });
+ // Animate from 0 to 1 after 25 frames
+ const logoTranslationProgress = spring({
+ frame: frame - 25,
+ fps,
+ config: {
+ damping: 100,
+ },
+ });
- // Move the logo up by 150 pixels once the transition starts
- const logoTranslation = interpolate(
- logoTranslationProgress,
- [0, 1],
- [0, -150],
- );
+ // Move the logo up by 150 pixels once the transition starts
+ const logoTranslation = interpolate(
+ logoTranslationProgress,
+ [0, 1],
+ [0, -150],
+ );
- // Fade out the animation at the end
- const opacity = interpolate(
- frame,
- [durationInFrames - 25, durationInFrames - 15],
- [1, 0],
- {
- extrapolateLeft: 'clamp',
- extrapolateRight: 'clamp',
- },
- );
+ // Fade out the animation at the end
+ const opacity = interpolate(
+ frame,
+ [durationInFrames - 25, durationInFrames - 15],
+ [1, 0],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ },
+ );
- // A <AbsoluteFill> is just a absolutely positioned <div>!
- return (
- <AbsoluteFill style={{backgroundColor: 'white'}}>
- <AbsoluteFill style={{opacity}}>
- <AbsoluteFill style={{transform: `translateY(${logoTranslation}px)`}}>
- <Logo />
- </AbsoluteFill>
- {/* Sequences can shift the time for its children! */}
- <Sequence from={35}>
- <Title titleText={titleText} titleColor={titleColor} />
- </Sequence>
- {/* The subtitle will only enter on the 75th frame. */}
- <Sequence from={75}>
- <Subtitle />
- </Sequence>
- </AbsoluteFill>
- </AbsoluteFill>
- );
+ // A <AbsoluteFill> is just a absolutely positioned <div>!
+ return (
+ <AbsoluteFill style={{ backgroundColor: "white" }}>
+ <AbsoluteFill style={{ opacity }}>
+ <AbsoluteFill style={{ transform: `translateY(${logoTranslation}px)` }}>
+ <Logo />
+ </AbsoluteFill>
+ {/* Sequences can shift the time for its children! */}
+ <Sequence from={35}>
+ <Title titleText={titleText} titleColor={titleColor} />
+ </Sequence>
+ {/* The subtitle will only enter on the 75th frame. */}
+ <Sequence from={75}>
+ <Subtitle />
+ </Sequence>
+ </AbsoluteFill>
+ </AbsoluteFill>
+ );
};
diff --git a/packages/template-javascript/src/Root.jsx b/packages/template-javascript/src/Root.jsx
index d07ea2bf04..1d37574388 100644
--- a/packages/template-javascript/src/Root.jsx
+++ b/packages/template-javascript/src/Root.jsx
@@ -1,37 +1,37 @@
-import {Composition} from 'remotion';
-import {HelloWorld} from './HelloWorld';
-import {Logo} from './HelloWorld/Logo';
+import { Composition } from "remotion";
+import { HelloWorld } from "./HelloWorld";
+import { Logo } from "./HelloWorld/Logo";
// Each <Composition> is an entry in the sidebar!
export const RemotionRoot = () => {
- return (
- <>
- <Composition
- // You can take the "id" to render a video:
- // npx remotion render src/index.jsx <id> out/video.mp4
- id="HelloWorld"
- component={HelloWorld}
- durationInFrames={150}
- fps={30}
- width={1920}
- height={1080}
- // You can override these props for each render:
- // https://www.remotion.dev/docs/parametrized-rendering
- defaultProps={{
- titleText: 'Welcome to Remotion',
- titleColor: 'black',
- }}
- />
- {/* 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}
- />
- </>
- );
+ return (
+ <>
+ <Composition
+ // You can take the "id" to render a video:
+ // npx remotion render src/index.jsx <id> out/video.mp4
+ id="HelloWorld"
+ component={HelloWorld}
+ durationInFrames={150}
+ fps={30}
+ width={1920}
+ height={1080}
+ // You can override these props for each render:
+ // https://www.remotion.dev/docs/parametrized-rendering
+ defaultProps={{
+ titleText: "Welcome to Remotion",
+ titleColor: "black",
+ }}
+ />
+ {/* 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}
+ />
+ </>
+ );
};
diff --git a/packages/template-javascript/src/index.js b/packages/template-javascript/src/index.js
index 8f5deb6df8..14dff4c457 100644
--- a/packages/template-javascript/src/index.js
+++ b/packages/template-javascript/src/index.js
@@ -1,7 +1,7 @@
// This is your entry file! Refer to it when you render:
// npx remotion render <entry-file> HelloWorld out/video.mp4
-import {registerRoot} from 'remotion';
-import {RemotionRoot} from './Root';
+import { registerRoot } from "remotion";
+import { RemotionRoot } from "./Root";
registerRoot(RemotionRoot);