Skip to content

🎥 Make videos programmatically with React

apple fireworks tutorial

Jonny Burger7ad6dffc01cf
diff --git a/packages/docs/learn/2022-11-18-apple-fireworks.md b/packages/docs/learn/2022-11-18-apple-fireworks.md
index e889b39a1d..2cc446c1ef 100644
--- a/packages/docs/learn/2022-11-18-apple-fireworks.md
+++ b/packages/docs/learn/2022-11-18-apple-fireworks.md
@@ -3,6 +3,77 @@ slug: apple-fireworks
title: Making the Apple fireworks tutorial
---
-```ts twoslash
-export const MyFn = () => null;
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+## Getting started
+
+Start a new Remotion project and select the blank template:
+
+<Tabs
+defaultValue="npm"
+values={[
+{ label: 'npm', value: 'npm', },
+{ label: 'yarn', value: 'yarn', },
+{ label: 'pnpm', value: 'pnpm', },
+]
+}>
+<TabItem value="npm">
+
+```bash
+npm init video
+```
+
+ </TabItem>
+ <TabItem value="pnpm">
+
+```bash
+pnpm create video
+```
+
+ </TabItem>
+
+ <TabItem value="yarn">
+
+```bash
+yarn create video
+```
+
+ </TabItem>
+</Tabs>
+
+## Create a background
+
+Create a background by creating a new file `src/Background.tsx` and returning a linear gradient:
+
+```tsx title="src/Background.tsx"
+import React from "react";
+import { AbsoluteFill } from "remotion";
+
+export const Background: React.FC = () => {
+ return (
+ <AbsoluteFill
+ style={{
+ background: "linear-gradient(to bottom, #000021, #010024)",
+ }}
+ />
+ );
+};
+```
+
+Return the background in your main composition `src/Comp.tsx`:
+
+```tsx twoslash
+export const Background: React.FC = () => null;
+import React from "react";
+import { AbsoluteFill } from "remotion";
+
+// ---cut---
+export const MyComposition: React.FC = () => {
+ return (
+ <AbsoluteFill>
+ <Background />
+ </AbsoluteFill>
+ );
+};
```