Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

feat: refactor docs deep

dev_wandry87b6afc6af32
diff --git a/content/docs/shaders/components/meta.json b/content/docs/shaders/components/meta.json
new file mode 100644
index 00000000..8f6db7ce
--- /dev/null
+++ b/content/docs/shaders/components/meta.json
@@ -0,0 +1,24 @@
+{
+ "title": "Shaders",
+ "collapsible": false,
+ "pages": [
+ "shader-mesh-gradient",
+ "shader-grain-gradient",
+ "shader-warp",
+ "shader-swirl",
+ "shader-water",
+ "shader-spiral",
+ "shader-liquid-metal",
+ "shader-color-panels",
+ "shader-neuro-noise",
+ "shader-perlin-noise",
+ "shader-simplex-noise",
+ "shader-voronoi",
+ "shader-dot-orbit",
+ "shader-dithering",
+ "shader-god-rays",
+ "shader-smoke-ring",
+ "shader-metaballs",
+ "shader-pulsing-border"
+ ]
+}
diff --git a/content/docs/shaders/shader-color-panels.mdx b/content/docs/shaders/components/shader-color-panels.mdx
similarity index 96%
rename from content/docs/shaders/shader-color-panels.mdx
rename to content/docs/shaders/components/shader-color-panels.mdx
index 5705b1c4..15bf291e 100644
--- a/content/docs/shaders/shader-color-panels.mdx
+++ b/content/docs/shaders/components/shader-color-panels.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-dithering.mdx b/content/docs/shaders/components/shader-dithering.mdx
similarity index 96%
rename from content/docs/shaders/shader-dithering.mdx
rename to content/docs/shaders/components/shader-dithering.mdx
index 0b450748..ede1ef25 100644
--- a/content/docs/shaders/shader-dithering.mdx
+++ b/content/docs/shaders/components/shader-dithering.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-dot-orbit.mdx b/content/docs/shaders/components/shader-dot-orbit.mdx
similarity index 96%
rename from content/docs/shaders/shader-dot-orbit.mdx
rename to content/docs/shaders/components/shader-dot-orbit.mdx
index c76f755e..901696f1 100644
--- a/content/docs/shaders/shader-dot-orbit.mdx
+++ b/content/docs/shaders/components/shader-dot-orbit.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-god-rays.mdx b/content/docs/shaders/components/shader-god-rays.mdx
similarity index 96%
rename from content/docs/shaders/shader-god-rays.mdx
rename to content/docs/shaders/components/shader-god-rays.mdx
index cefaf869..3e8cecba 100644
--- a/content/docs/shaders/shader-god-rays.mdx
+++ b/content/docs/shaders/components/shader-god-rays.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-grain-gradient.mdx b/content/docs/shaders/components/shader-grain-gradient.mdx
similarity index 97%
rename from content/docs/shaders/shader-grain-gradient.mdx
rename to content/docs/shaders/components/shader-grain-gradient.mdx
index 16aa7617..2ee5bced 100644
--- a/content/docs/shaders/shader-grain-gradient.mdx
+++ b/content/docs/shaders/components/shader-grain-gradient.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-liquid-metal.mdx b/content/docs/shaders/components/shader-liquid-metal.mdx
similarity index 96%
rename from content/docs/shaders/shader-liquid-metal.mdx
rename to content/docs/shaders/components/shader-liquid-metal.mdx
index ab0c82f0..c1a27bde 100644
--- a/content/docs/shaders/shader-liquid-metal.mdx
+++ b/content/docs/shaders/components/shader-liquid-metal.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-mesh-gradient.mdx b/content/docs/shaders/components/shader-mesh-gradient.mdx
similarity index 97%
rename from content/docs/shaders/shader-mesh-gradient.mdx
rename to content/docs/shaders/components/shader-mesh-gradient.mdx
index dc285059..117a1aad 100644
--- a/content/docs/shaders/shader-mesh-gradient.mdx
+++ b/content/docs/shaders/components/shader-mesh-gradient.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-metaballs.mdx b/content/docs/shaders/components/shader-metaballs.mdx
similarity index 96%
rename from content/docs/shaders/shader-metaballs.mdx
rename to content/docs/shaders/components/shader-metaballs.mdx
index e0529f45..7923e21d 100644
--- a/content/docs/shaders/shader-metaballs.mdx
+++ b/content/docs/shaders/components/shader-metaballs.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-neuro-noise.mdx b/content/docs/shaders/components/shader-neuro-noise.mdx
similarity index 96%
rename from content/docs/shaders/shader-neuro-noise.mdx
rename to content/docs/shaders/components/shader-neuro-noise.mdx
index 63cbe670..1f143375 100644
--- a/content/docs/shaders/shader-neuro-noise.mdx
+++ b/content/docs/shaders/components/shader-neuro-noise.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-perlin-noise.mdx b/content/docs/shaders/components/shader-perlin-noise.mdx
similarity index 96%
rename from content/docs/shaders/shader-perlin-noise.mdx
rename to content/docs/shaders/components/shader-perlin-noise.mdx
index 9a505bc5..49856e19 100644
--- a/content/docs/shaders/shader-perlin-noise.mdx
+++ b/content/docs/shaders/components/shader-perlin-noise.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-pulsing-border.mdx b/content/docs/shaders/components/shader-pulsing-border.mdx
similarity index 96%
rename from content/docs/shaders/shader-pulsing-border.mdx
rename to content/docs/shaders/components/shader-pulsing-border.mdx
index 319c0049..c80158b0 100644
--- a/content/docs/shaders/shader-pulsing-border.mdx
+++ b/content/docs/shaders/components/shader-pulsing-border.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-simplex-noise.mdx b/content/docs/shaders/components/shader-simplex-noise.mdx
similarity index 96%
rename from content/docs/shaders/shader-simplex-noise.mdx
rename to content/docs/shaders/components/shader-simplex-noise.mdx
index 5fddd3bd..4f75b1d7 100644
--- a/content/docs/shaders/shader-simplex-noise.mdx
+++ b/content/docs/shaders/components/shader-simplex-noise.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-smoke-ring.mdx b/content/docs/shaders/components/shader-smoke-ring.mdx
similarity index 96%
rename from content/docs/shaders/shader-smoke-ring.mdx
rename to content/docs/shaders/components/shader-smoke-ring.mdx
index 53628c32..ad84eefd 100644
--- a/content/docs/shaders/shader-smoke-ring.mdx
+++ b/content/docs/shaders/components/shader-smoke-ring.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-spiral.mdx b/content/docs/shaders/components/shader-spiral.mdx
similarity index 96%
rename from content/docs/shaders/shader-spiral.mdx
rename to content/docs/shaders/components/shader-spiral.mdx
index effeeb2f..d20780f1 100644
--- a/content/docs/shaders/shader-spiral.mdx
+++ b/content/docs/shaders/components/shader-spiral.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-swirl.mdx b/content/docs/shaders/components/shader-swirl.mdx
similarity index 96%
rename from content/docs/shaders/shader-swirl.mdx
rename to content/docs/shaders/components/shader-swirl.mdx
index d06484f2..4f807254 100644
--- a/content/docs/shaders/shader-swirl.mdx
+++ b/content/docs/shaders/components/shader-swirl.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-voronoi.mdx b/content/docs/shaders/components/shader-voronoi.mdx
similarity index 96%
rename from content/docs/shaders/shader-voronoi.mdx
rename to content/docs/shaders/components/shader-voronoi.mdx
index 9a74cfea..3130f952 100644
--- a/content/docs/shaders/shader-voronoi.mdx
+++ b/content/docs/shaders/components/shader-voronoi.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-warp.mdx b/content/docs/shaders/components/shader-warp.mdx
similarity index 96%
rename from content/docs/shaders/shader-warp.mdx
rename to content/docs/shaders/components/shader-warp.mdx
index 4668050b..6398de00 100644
--- a/content/docs/shaders/shader-warp.mdx
+++ b/content/docs/shaders/components/shader-warp.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/shader-water.mdx b/content/docs/shaders/components/shader-water.mdx
similarity index 96%
rename from content/docs/shaders/shader-water.mdx
rename to content/docs/shaders/components/shader-water.mdx
index e3c83d3c..876c722e 100644
--- a/content/docs/shaders/shader-water.mdx
+++ b/content/docs/shaders/components/shader-water.mdx
@@ -34,4 +34,4 @@ export const RemotionRoot = () => (
## Credits
-Shader by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
+Shader by [paper-design/shaders](https://github.com/paper-design/shaders).
diff --git a/content/docs/shaders/getting-started/introduction.mdx b/content/docs/shaders/getting-started/introduction.mdx
new file mode 100644
index 00000000..e07c9662
--- /dev/null
+++ b/content/docs/shaders/getting-started/introduction.mdx
@@ -0,0 +1,34 @@
+---
+title: Introduction
+description: WebGL shader backdrops wrapped for Remotion and driven per-frame for deterministic renders
+---
+
+Shaders are GPU-rendered animated backgrounds for your Remotion scenes. Each one wraps a shader from [paper-design/shaders](https://github.com/paper-design/shaders) and adapts it to the way Remotion renders video — headless, frame by frame, the same output on every pass.
+
+Drop one behind your content as a full-bleed backdrop, tune a few controls, and reach for the raw shader parameters when you want full control.
+
+## Why a dedicated wrapper
+
+A shader animates against a wall-clock timer. Remotion does not — it renders frame N in isolation, often out of order and across parallel workers, and expects the exact same pixels every time it asks for that frame.
+
+Each component bridges the two: instead of letting the shader run on its own clock, it freezes the shader (`speed={0}`) and drives its `frame` uniform from `useCurrentFrame()`. The motion becomes a pure function of the timeline, so scrubbing, looping, and multi-pass renders all stay deterministic.
+
+The wrapper also gates the first paint with `delayRender()`/`continueRender()` so WebGL is initialised before Remotion captures a frame, and forces the canvas to fill the whole composition (`fit="cover"` with the exact `width`/`height`) so there are no black margins.
+
+## Using a shader
+
+```tsx
+import { AbsoluteFill } from "remotion";
+import { ShaderMeshGradient } from "@/components/remocn/shader-mesh-gradient";
+
+export const Scene = () => (
+ <AbsoluteFill>
+ <ShaderMeshGradient speed={1} />
+ <AbsoluteFill>{/* your content on top */}</AbsoluteFill>
+ </AbsoluteFill>
+);
+```
+
+Every component exposes a `speed` control plus a handful of shader-specific ones, and forwards any remaining paper-design prop through, so nothing is locked away. Defaults are deliberately muted — pick your own palette when you want the shader to lead.
+
+Browse the individual shaders in the sidebar to preview each one and grab its install command.
diff --git a/content/docs/shaders/getting-started/meta.json b/content/docs/shaders/getting-started/meta.json
new file mode 100644
index 00000000..89d653a4
--- /dev/null
+++ b/content/docs/shaders/getting-started/meta.json
@@ -0,0 +1,5 @@
+{
+ "title": "Getting Started",
+ "collapsible": false,
+ "pages": ["introduction"]
+}
diff --git a/content/docs/shaders/index.mdx b/content/docs/shaders/index.mdx
deleted file mode 100644
index 846be19e..00000000
--- a/content/docs/shaders/index.mdx
+++ /dev/null
@@ -1,165 +0,0 @@
----
-title: Shaders
-description: WebGL shader backdrops for Remotion, frozen to the current frame for deterministic renders
----
-
-GPU shader backgrounds wrapped for Remotion. Each one is driven per-frame, so renders stay deterministic across every pass. Colors and motion are tunable, and every raw shader parameter stays available for full control.
-
-Powered by [paper-design/shaders](https://github.com/paper-design/shaders) (Apache-2.0).
-
-## Gradients
-
-<ComponentCardGrid
- items={[
- {
- name: "ShaderMeshGradient",
- description: "WebGL mesh gradient backdrop with drifting color blobs, driven per-frame",
- status: "stable",
- href: "/docs/shaders/shader-mesh-gradient",
- },
- {
- name: "ShaderGrainGradient",
- description: "Grainy multi-stop gradient that drifts slowly with film-grain texture over the blend",
- status: "stable",
- href: "/docs/shaders/shader-grain-gradient",
- },
- ]}
-/>
-
-## Flow
-
-<ComponentCardGrid
- items={[
- {
- name: "ShaderWarp",
- description: "Domain-warped color field that folds and stretches like liquid",
- status: "stable",
- href: "/docs/shaders/shader-warp",
- },
- {
- name: "ShaderSwirl",
- description: "Concentric bands swirling around a center point",
- status: "stable",
- href: "/docs/shaders/shader-swirl",
- },
- {
- name: "ShaderWater",
- description: "Caustic water-surface ripples with subtle refraction",
- status: "stable",
- href: "/docs/shaders/shader-water",
- },
- {
- name: "ShaderSpiral",
- description: "Rotating spiral arms radiating from the center",
- status: "stable",
- href: "/docs/shaders/shader-spiral",
- },
- {
- name: "ShaderLiquidMetal",
- description: "Molten metallic surface with flowing specular highlights",
- status: "stable",
- href: "/docs/shaders/shader-liquid-metal",
- },
- {
- name: "ShaderColorPanels",
- description: "Overlapping translucent color panels sliding past each other",
- status: "stable",
- href: "/docs/shaders/shader-color-panels",
- },
- ]}
-/>
-
-## Noise
-
-<ComponentCardGrid
- items={[
- {
- name: "ShaderNeuroNoise",
- description: "Organic neural-web noise field that slowly morphs",
- status: "stable",
- href: "/docs/shaders/shader-neuro-noise",
- },
- {
- name: "ShaderPerlinNoise",
- description: "Classic Perlin noise clouds drifting across the frame",
- status: "stable",
- href: "/docs/shaders/shader-perlin-noise",
- },
- {
- name: "ShaderSimplexNoise",
- description: "Simplex noise flow field, smoother than Perlin",
- status: "stable",
- href: "/docs/shaders/shader-simplex-noise",
- },
- {
- name: "ShaderVoronoi",
- description: "Animated Voronoi cells shifting and re-tessellating",
- status: "stable",
- href: "/docs/shaders/shader-voronoi",
- },
- ]}
-/>
-
-## Pattern
-
-<ComponentCardGrid
- items={[
- {
- name: "ShaderDotOrbit",
- description: "Dots orbiting on concentric paths across the frame",
- status: "stable",
- href: "/docs/shaders/shader-dot-orbit",
- },
- ]}
-/>
-
-## Texture
-
-<ComponentCardGrid
- items={[
- {
- name: "ShaderDithering",
- description: "Ordered-dither shading over an animated gradient field",
- status: "stable",
- href: "/docs/shaders/shader-dithering",
- },
- ]}
-/>
-
-## Light
-
-<ComponentCardGrid
- items={[
- {
- name: "ShaderGodRays",
- description: "Volumetric light rays radiating from an off-screen source",
- status: "stable",
- href: "/docs/shaders/shader-god-rays",
- },
- {
- name: "ShaderSmokeRing",
- description: "Soft smoke ring curling and dissipating in place",
- status: "stable",
- href: "/docs/shaders/shader-smoke-ring",
- },
- {
- name: "ShaderPulsingBorder",
- description: "Glowing border frame that pulses around the edges",
- status: "stable",
- href: "/docs/shaders/shader-pulsing-border",
- },
- ]}
-/>
-
-## Organic
-
-<ComponentCardGrid
- items={[
- {
- name: "ShaderMetaballs",
- description: "Organic blobs merging and splitting like lava",
- status: "stable",
- href: "/docs/shaders/shader-metaballs",
- },
- ]}
-/>
diff --git a/content/docs/shaders/meta.json b/content/docs/shaders/meta.json
index 6906a212..a3f93168 100644
--- a/content/docs/shaders/meta.json
+++ b/content/docs/shaders/meta.json
@@ -1,25 +1,5 @@
{
"title": "Shaders",
"collapsible": false,
- "pages": [
- "index",
- "shader-mesh-gradient",
- "shader-grain-gradient",
- "shader-warp",
- "shader-swirl",
- "shader-water",
- "shader-spiral",
- "shader-liquid-metal",
- "shader-color-panels",
- "shader-neuro-noise",
- "shader-perlin-noise",
- "shader-simplex-noise",
- "shader-voronoi",
- "shader-dot-orbit",
- "shader-dithering",
- "shader-god-rays",
- "shader-smoke-ring",
- "shader-metaballs",
- "shader-pulsing-border"
- ]
+ "pages": ["getting-started", "components"]
}
diff --git a/lib/docs-tabs.ts b/lib/docs-tabs.ts
index 3db4f2a1..55d9d8f9 100644
--- a/lib/docs-tabs.ts
+++ b/lib/docs-tabs.ts
@@ -23,7 +23,11 @@ export const DOCS_TABS: DocsTab[] = [
href: "/docs/getting-started/introduction",
},
{ id: "primitives", label: "Primitives", href: "/docs/ui" },
- { id: "shaders", label: "Shaders", href: "/docs/shaders" },
+ {
+ id: "shaders",
+ label: "Shaders",
+ href: "/docs/shaders/getting-started/introduction",
+ },
];
/** URL prefix that backs the Primitives tab (the remocn-ui section). */
@@ -62,13 +66,20 @@ function isPrimitivesNode(node: Node): boolean {
);
}
+/** True if the node (or any descendant) is a shaders page — folders now nest. */
+function hasShadersDescendant(node: Node): boolean {
+ if (node.type === "page") return node.url.startsWith(`${SHADERS_PREFIX}/`);
+ if (node.type === "folder") {
+ if (node.index?.url === SHADERS_PREFIX) return true;
+ return node.children.some(hasShadersDescendant);
+ }
+ return false;
+}
+
function isShadersNode(node: Node): boolean {
if (node.type !== "folder") return false;
if (node.index?.url === SHADERS_PREFIX) return true;
- return node.children.some(
- (child) =>
- child.type === "page" && child.url.startsWith(`${SHADERS_PREFIX}/`),
- );
+ return node.children.some(hasShadersDescendant);
}
/**