Skip to content

🎥 Make videos programmatically with React

Docs: Add examples section structure

Igor Samokhovets4c7991c1d5a4
diff --git a/bun.lock b/bun.lock
index 6ea197ee95..0ab5dd706c 100644
--- a/bun.lock
+++ b/bun.lock
@@ -414,6 +414,7 @@
"@docusaurus/core": "3.9.2",
"@docusaurus/faster": "3.9.2",
"@docusaurus/plugin-content-blog": "3.9.2",
+ "@docusaurus/plugin-content-docs": "3.9.2",
"@docusaurus/preset-classic": "3.9.2",
"@docusaurus/theme-common": "3.9.2",
"@docusaurus/types": "3.9.2",
diff --git a/packages/docs/docusaurus.config.ts b/packages/docs/docusaurus.config.ts
index f6e04c3022..58123c8bde 100644
--- a/packages/docs/docusaurus.config.ts
+++ b/packages/docs/docusaurus.config.ts
@@ -298,6 +298,19 @@ const config: Config = {
],
],
plugins: [
+ [
+ '@docusaurus/plugin-content-docs',
+ {
+ id: 'examples',
+ path: './examples',
+ routeBasePath: 'examples',
+ sidebarPath: './examples-sidebars.ts',
+ editUrl:
+ 'https://github.com/remotion-dev/remotion/edit/main/packages/docs/',
+ showLastUpdateTime: true,
+ remarkPlugins: [remarkExportRaw],
+ },
+ ],
[
'@docusaurus/plugin-content-blog',
{
diff --git a/packages/docs/examples-sidebars.ts b/packages/docs/examples-sidebars.ts
new file mode 100644
index 0000000000..9b5a58360f
--- /dev/null
+++ b/packages/docs/examples-sidebars.ts
@@ -0,0 +1,70 @@
+// @ts-expect-error
+import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
+
+const sidebars: SidebarsConfig = {
+ examplesSidebar: [
+ 'index',
+ {
+ type: 'category',
+ label: 'Maps',
+ link: {type: 'doc', id: 'maps/index'},
+ items: [],
+ },
+ {
+ type: 'category',
+ label: 'Sport',
+ link: {type: 'doc', id: 'sport/index'},
+ items: [],
+ },
+ {
+ type: 'category',
+ label: 'Storytelling',
+ link: {type: 'doc', id: 'storytelling/index'},
+ items: [],
+ },
+ {
+ type: 'category',
+ label: 'Audio',
+ link: {type: 'doc', id: 'audio/index'},
+ items: [],
+ },
+ {
+ type: 'category',
+ label: 'Captions',
+ link: {type: 'doc', id: 'captions/index'},
+ items: [],
+ },
+ {
+ type: 'category',
+ label: 'Motion design system',
+ link: {type: 'doc', id: 'motion-design-system/index'},
+ items: [],
+ },
+ {
+ type: 'category',
+ label: 'Effects',
+ link: {type: 'doc', id: 'effects/index'},
+ items: [],
+ },
+ {
+ type: 'category',
+ label: 'WebGL',
+ link: {type: 'doc', id: 'webgl/index'},
+ items: [],
+ },
+ {
+ type: 'category',
+ label: '3D',
+ link: {type: 'doc', id: '3d/index'},
+ items: [],
+ },
+ {
+ type: 'category',
+ label: 'Remotion best practices',
+ link: {type: 'doc', id: 'best-practices/index'},
+ items: [],
+ },
+ ],
+};
+
+export default sidebars;
diff --git a/packages/docs/examples/3d/index.mdx b/packages/docs/examples/3d/index.mdx
new file mode 100644
index 0000000000..69d486501d
--- /dev/null
+++ b/packages/docs/examples/3d/index.mdx
@@ -0,0 +1,11 @@
+---
+title: 3D
+description: 3D examples for Remotion.
+---
+
+# 3D
+
+Planned examples:
+
+- Spinning object, for example a disco ball
+- Video texture
diff --git a/packages/docs/examples/audio/index.mdx b/packages/docs/examples/audio/index.mdx
new file mode 100644
index 0000000000..0eddfe103c
--- /dev/null
+++ b/packages/docs/examples/audio/index.mdx
@@ -0,0 +1,11 @@
+---
+title: Audio
+description: Audio-reactive Remotion examples.
+---
+
+# Audio
+
+Planned examples:
+
+- Music visualizer
+- Audiogram
diff --git a/packages/docs/examples/best-practices/index.mdx b/packages/docs/examples/best-practices/index.mdx
new file mode 100644
index 0000000000..ea037514b1
--- /dev/null
+++ b/packages/docs/examples/best-practices/index.mdx
@@ -0,0 +1,11 @@
+---
+title: Remotion best practices
+description: Best-practice examples for Remotion projects.
+---
+
+# Remotion best practices
+
+Planned examples:
+
+- Drag and drop
+- Jumpcuts technique
diff --git a/packages/docs/examples/captions/index.mdx b/packages/docs/examples/captions/index.mdx
new file mode 100644
index 0000000000..eb736d5ab6
--- /dev/null
+++ b/packages/docs/examples/captions/index.mdx
@@ -0,0 +1,11 @@
+---
+title: Captions
+description: Caption and lyrics animation examples for Remotion.
+---
+
+# Captions
+
+Planned examples:
+
+- TikTok-style captions
+- Lyrics animation
diff --git a/packages/docs/examples/effects/index.mdx b/packages/docs/examples/effects/index.mdx
new file mode 100644
index 0000000000..1aa5970f9f
--- /dev/null
+++ b/packages/docs/examples/effects/index.mdx
@@ -0,0 +1,13 @@
+---
+title: Effects
+description: Visual effects examples for Remotion.
+---
+
+# Effects
+
+Planned examples:
+
+- Greenscreen
+- Wiggle
+- Magnifier
+- Sticker peel
diff --git a/packages/docs/examples/index.mdx b/packages/docs/examples/index.mdx
new file mode 100644
index 0000000000..314fab2901
--- /dev/null
+++ b/packages/docs/examples/index.mdx
@@ -0,0 +1,139 @@
+---
+title: Examples
+description: Small, remixable motion graphics examples for Remotion.
+---
+
+# Examples
+
+Small, remixable motion graphics examples for Remotion.
+
+This section is a structure preview. Individual example pages will be added later.
+
+<style>{`
+.examplesCategories {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
+ gap: 40px 56px;
+ margin-top: 40px;
+}
+
+.examplesCategory h2 {
+ border: 0;
+ font-size: 1.35rem;
+ margin: 0 0 18px;
+ padding: 0;
+}
+
+.examplesCategory h2 a {
+ color: var(--ifm-heading-color);
+ text-decoration: none;
+}
+
+.examplesCategory h2 a:hover {
+ color: var(--ifm-color-primary);
+}
+
+.examplesCategory ul {
+ border-left: 2px solid var(--ifm-color-emphasis-200);
+ list-style: none;
+ margin: 0;
+ padding: 2px 0 2px 28px;
+}
+
+.examplesCategory li {
+ color: var(--ifm-font-color-base);
+ font-size: 1.1rem;
+ line-height: 1.45;
+ margin: 0 0 18px;
+}
+
+.examplesCategory li:last-child {
+ margin-bottom: 0;
+}
+`}</style>
+
+<div className="examplesCategories">
+ <section className="examplesCategory">
+ <h2><a href="/examples/maps">Maps</a></h2>
+ <ul>
+ <li>Mapbox line from A to B</li>
+ <li>3D building</li>
+ </ul>
+ </section>
+
+ <section className="examplesCategory">
+ <h2><a href="/examples/sport">Sport</a></h2>
+ <ul>
+ <li>Strava visualization</li>
+ <li>Mapbox / Athlete's Eye demo</li>
+ </ul>
+ </section>
+
+ <section className="examplesCategory">
+ <h2><a href="/examples/storytelling">Storytelling</a></h2>
+ <ul>
+ <li>Paper.js highlight</li>
+ <li>News headline</li>
+ <li>Bar chart</li>
+ <li>Pie chart</li>
+ <li>Number wheel</li>
+ </ul>
+ </section>
+
+ <section className="examplesCategory">
+ <h2><a href="/examples/audio">Audio</a></h2>
+ <ul>
+ <li>Music visualizer</li>
+ <li>Audiogram</li>
+ </ul>
+ </section>
+
+ <section className="examplesCategory">
+ <h2><a href="/examples/captions">Captions</a></h2>
+ <ul>
+ <li>TikTok-style captions</li>
+ <li>Lyrics animation</li>
+ </ul>
+ </section>
+
+ <section className="examplesCategory">
+ <h2><a href="/examples/motion-design-system">Motion design system</a></h2>
+ <ul>
+ <li>Lower third</li>
+ <li>Code example</li>
+ </ul>
+ </section>
+
+ <section className="examplesCategory">
+ <h2><a href="/examples/effects">Effects</a></h2>
+ <ul>
+ <li>Greenscreen</li>
+ <li>Wiggle</li>
+ <li>Magnifier</li>
+ <li>Sticker peel</li>
+ </ul>
+ </section>
+
+ <section className="examplesCategory">
+ <h2><a href="/examples/webgl">WebGL</a></h2>
+ <ul>
+ <li>Chromatic aberration</li>
+ </ul>
+ </section>
+
+ <section className="examplesCategory">
+ <h2><a href="/examples/3d">3D</a></h2>
+ <ul>
+ <li>Spinning object, for example a disco ball</li>
+ <li>Video texture</li>
+ </ul>
+ </section>
+
+ <section className="examplesCategory">
+ <h2><a href="/examples/best-practices">Remotion best practices</a></h2>
+ <ul>
+ <li>Drag and drop</li>
+ <li>Jumpcuts technique</li>
+ </ul>
+ </section>
+</div>
diff --git a/packages/docs/examples/maps/index.mdx b/packages/docs/examples/maps/index.mdx
new file mode 100644
index 0000000000..c9f1e72ac1
--- /dev/null
+++ b/packages/docs/examples/maps/index.mdx
@@ -0,0 +1,11 @@
+---
+title: Maps
+description: Map-based Remotion examples.
+---
+
+# Maps
+
+Planned examples:
+
+- Mapbox line from A to B
+- 3D building
diff --git a/packages/docs/examples/motion-design-system/index.mdx b/packages/docs/examples/motion-design-system/index.mdx
new file mode 100644
index 0000000000..0f838a3333
--- /dev/null
+++ b/packages/docs/examples/motion-design-system/index.mdx
@@ -0,0 +1,11 @@
+---
+title: Motion design system
+description: Reusable motion design system examples for Remotion.
+---
+
+# Motion design system
+
+Planned examples:
+
+- Lower third
+- Code example
diff --git a/packages/docs/examples/sport/index.mdx b/packages/docs/examples/sport/index.mdx
new file mode 100644
index 0000000000..5df3293408
--- /dev/null
+++ b/packages/docs/examples/sport/index.mdx
@@ -0,0 +1,11 @@
+---
+title: Sport
+description: Sports visualization examples for Remotion.
+---
+
+# Sport
+
+Planned examples:
+
+- Strava visualization
+- Mapbox / Athlete's Eye demo
diff --git a/packages/docs/examples/storytelling/index.mdx b/packages/docs/examples/storytelling/index.mdx
new file mode 100644
index 0000000000..069f1cc430
--- /dev/null
+++ b/packages/docs/examples/storytelling/index.mdx
@@ -0,0 +1,14 @@
+---
+title: Storytelling
+description: Storytelling graphics examples for Remotion.
+---
+
+# Storytelling
+
+Planned examples:
+
+- Paper.js highlight
+- News headline
+- Bar chart
+- Pie chart
+- Number wheel
diff --git a/packages/docs/examples/webgl/index.mdx b/packages/docs/examples/webgl/index.mdx
new file mode 100644
index 0000000000..48534e5ffb
--- /dev/null
+++ b/packages/docs/examples/webgl/index.mdx
@@ -0,0 +1,10 @@
+---
+title: WebGL
+description: WebGL examples for Remotion.
+---
+
+# WebGL
+
+Planned examples:
+
+- Chromatic aberration
diff --git a/packages/docs/package.json b/packages/docs/package.json
index 0c7abbf162..0a5760a9c5 100644
--- a/packages/docs/package.json
+++ b/packages/docs/package.json
@@ -26,6 +26,7 @@
"@docusaurus/core": "3.9.2",
"@docusaurus/faster": "3.9.2",
"@docusaurus/plugin-content-blog": "3.9.2",
+ "@docusaurus/plugin-content-docs": "3.9.2",
"@docusaurus/preset-classic": "3.9.2",
"@docusaurus/theme-common": "3.9.2",
"@docusaurus/types": "3.9.2",