Skip to content

🎥 Make videos programmatically with React

Docs: Move Element authoring guides into a dedicated section

Igor Samokhovets647aef6f95a6
diff --git a/.agents/skills/scaffold-element/SKILL.md b/.agents/skills/scaffold-element/SKILL.md
index dc3edd56b7..67c3a97fda 100644
--- a/.agents/skills/scaffold-element/SKILL.md
+++ b/.agents/skills/scaffold-element/SKILL.md
@@ -5,7 +5,7 @@ description: Scaffold a new Remotion Element for development in the docs Remotio
# Scaffold a Remotion Element
-Read the [Element guidelines](../../../packages/docs/docs/studio/creating-elements.mdx) for design and implementation guidance and the [Element contribution guide](../../../packages/docs/docs/contributing/elements.mdx) for the official gallery submission process. Then follow its [Develop the Element](../../../packages/docs/docs/contributing/elements.mdx#1-develop-the-element) section.
+Read the [Element guidelines](../../../packages/docs/docs/elements.mdx) for design and implementation guidance and the [Element contribution guide](../../../packages/docs/docs/contributing/elements.mdx) for the official gallery submission process. Then follow its [Develop the Element](../../../packages/docs/docs/contributing/elements.mdx#1-develop-the-element) section.
After scaffolding, suggest opening Docs Studio to preview the Element. If the user agrees, start it without opening a browser automatically:
diff --git a/packages/docs/docs/contributing/elements.mdx b/packages/docs/docs/contributing/elements.mdx
index 74cf442034..24637ab12e 100644
--- a/packages/docs/docs/contributing/elements.mdx
+++ b/packages/docs/docs/contributing/elements.mdx
@@ -10,7 +10,7 @@ description: Create and submit a Remotion Element for the Elements gallery.
First, [set up the repository](/docs/contributing).
-Use your AI coding agent to build an Element. Give it this page and the [Element guidelines](/docs/studio/creating-elements).
+Use your AI coding agent to build an Element. Give it this page and the [Element guidelines](/docs/elements).
## 1. Develop the Element
@@ -21,7 +21,7 @@ Create a dotted paper background Element.
Use the notebook paper Element as a reference.
```
-See the guidelines for [dependencies](/docs/studio/creating-elements#dependencies), [assets](/docs/studio/creating-elements#assets), and [initial props](/docs/studio/creating-elements#initial-props).
+See the guidelines for [dependencies](/docs/elements#dependencies), [assets](/docs/elements#assets), and [initial props](/docs/elements#initial-props).
Open Studio to check the animation:
diff --git a/packages/docs/docs/studio/creating-elements.mdx b/packages/docs/docs/elements.mdx
similarity index 92%
rename from packages/docs/docs/studio/creating-elements.mdx
rename to packages/docs/docs/elements.mdx
index 7ea3f7e873..b601acd8c7 100644
--- a/packages/docs/docs/studio/creating-elements.mdx
+++ b/packages/docs/docs/elements.mdx
@@ -1,5 +1,5 @@
---
-image: /generated/articles-docs-studio-creating-elements.png
+image: /generated/articles-docs-elements.png
title: Creating Elements
description: Design reusable Remotion Elements for any Element library.
---
@@ -10,7 +10,7 @@ An Element is a reusable video building block written as a React component, such
When you [add an Element in Studio](/docs/studio/browse-elements), Studio copies its source code into your project and installs its dependencies. You can edit the copied code to change how it looks and behaves, or use its Inspector controls if it exposes them.
-This guide covers how to design and build Elements for the official catalog or your own Element Library. To let users install Elements from your library's website, see [Integrating an Element Library with Studio](/docs/studio-protocol/component-library-integration).
+This guide covers how to design and build Elements for the official catalog or your own Element Library. To let users install Elements from your library's website, see [Building Element Libraries](/docs/elements/libraries).
## Design
@@ -43,7 +43,7 @@ Minimize dependencies, and declare them as described in the [`dependencies` fiel
### Assets
-Include assets that should be copied into the user's project, as described in the [asset handling guidance](/docs/studio-protocol/component-library-integration#asset-handling). Use Google Fonts for non-websafe fonts.
+Include assets that should be copied into the user's project, as described in the [asset handling guidance](/docs/elements/libraries#asset-handling). Use Google Fonts for non-websafe fonts.
## Integrate with Studio
diff --git a/packages/docs/docs/studio-protocol/component-library-integration.mdx b/packages/docs/docs/elements/libraries.mdx
similarity index 89%
rename from packages/docs/docs/studio-protocol/component-library-integration.mdx
rename to packages/docs/docs/elements/libraries.mdx
index 22fb5abf20..a772c7e731 100644
--- a/packages/docs/docs/studio-protocol/component-library-integration.mdx
+++ b/packages/docs/docs/elements/libraries.mdx
@@ -1,13 +1,15 @@
---
-image: /generated/articles-docs-studio-protocol-component-library-integration.png
-title: 'Integrating an Element Library with Studio'
-sidebar_label: 'Element Library integration'
-crumb: '@remotion/studio-protocol'
+image: /generated/articles-docs-elements-libraries.png
+title: 'Building Element Libraries'
---
-# Integrating an Element Library with Studio
+# Building Element Libraries
-Make sure your library's components follow the [Element guidelines](/docs/studio/creating-elements).
+An Element Library is a website that offers a collection of reusable video components, such as titles, backgrounds, and caption styles. Users can preview these [Elements](/elements) and install them into their Remotion projects, where they can edit the source code.
+
+Users can visit your library directly or add it to [Browse Elements in Studio](/docs/studio/browse-elements). See [third-party Element Libraries](/elements/libraries) for examples.
+
+For guidance on building the components themselves, see [Creating Elements](/docs/elements).
## Template with best practices
@@ -143,7 +145,7 @@ In production, serve your website over HTTPS. HTTP works only on `localhost` and
## See also
- [Third-party Element Libraries](/elements/libraries)
-- [Element guidelines](/docs/studio/creating-elements)
+- [Element guidelines](/docs/elements)
- [`<Player>`](/docs/player)
- [`createElementPayload()`](/docs/studio-protocol/create-element-payload)
- [`staticFileRef()`](/docs/studio-protocol/static-file-ref)
diff --git a/packages/docs/docs/studio-protocol/create-element-payload.mdx b/packages/docs/docs/studio-protocol/create-element-payload.mdx
index a77bf7bd0f..a19ce7fcd4 100644
--- a/packages/docs/docs/studio-protocol/create-element-payload.mdx
+++ b/packages/docs/docs/studio-protocol/create-element-payload.mdx
@@ -63,7 +63,7 @@ A lowercase Element identifier. Its final path segment is used to create the `.e
A string containing the complete Element source code. It must contain exactly one exported named component.
-See [Integrating an Element Library with Studio](/docs/studio-protocol/component-library-integration) for recommended ways to preview a component and represent it as Element source in Vite-based projects and Next.js.
+See [Building Element Libraries](/docs/elements/libraries) for recommended ways to preview a component and represent it as Element source in Vite-based projects and Next.js.
### dependencies
@@ -115,7 +115,7 @@ With `'wrapped'`, Studio generates a [`<Sequence>`](/docs/sequence) around the c
With `'component-owned-sequence'`, Studio puts timing, name, and absolute positioning props on the component call without adding an outer Sequence. The component must provide its own Studio-editable Sequence and rendered dimensions.
-See [Choose an installation mode](/docs/studio/creating-elements#choose-an-installation-mode) for guidance on choosing a mode and wiring the component.
+See [Choose an installation mode](/docs/elements#choose-an-installation-mode) for guidance on choosing a mode and wiring the component.
### isCaptionStyle?<AvailableFrom v="4.0.535" />
diff --git a/packages/docs/docs/studio-protocol/index.mdx b/packages/docs/docs/studio-protocol/index.mdx
index 94fa9f5505..bf4248f9d2 100644
--- a/packages/docs/docs/studio-protocol/index.mdx
+++ b/packages/docs/docs/studio-protocol/index.mdx
@@ -48,4 +48,4 @@ Learn about the [confirmation and origin policy](/docs/studio-protocol/security)
## See also
-- [Integrating an Element Library with Studio](/docs/studio-protocol/component-library-integration)
+- [Building Element Libraries](/docs/elements/libraries)
diff --git a/packages/docs/docs/studio-protocol/install-in-studio.mdx b/packages/docs/docs/studio-protocol/install-in-studio.mdx
index 66dea378dd..294504db31 100644
--- a/packages/docs/docs/studio-protocol/install-in-studio.mdx
+++ b/packages/docs/docs/studio-protocol/install-in-studio.mdx
@@ -40,7 +40,7 @@ if (!result.success) {
An installation request provides a one-click flow and shows the requesting website in Studio. On macOS, Studio attempts to bring the selected Studio tab to the foreground after delivering the request.
-When [the library](/docs/studio-protocol/component-library-integration) is embedded in Studio, the containing Studio is selected. Otherwise, local Studio ports are probed and the most recently focused compatible Studio tab is used. If only one writable tab is available, it can receive the request without having been focused <AvailableFrom v="4.0.530" inline />. Also offer drag-and-drop with [`setStudioDragData()`](/docs/studio-protocol/set-studio-drag-data) when possible so the user can choose a specific Studio tab, timeline position, and canvas position.
+When [the library](/docs/elements/libraries) is embedded in Studio, the containing Studio is selected. Otherwise, local Studio ports are probed and the most recently focused compatible Studio tab is used. If only one writable tab is available, it can receive the request without having been focused <AvailableFrom v="4.0.530" inline />. Also offer drag-and-drop with [`setStudioDragData()`](/docs/studio-protocol/set-studio-drag-data) when possible so the user can choose a specific Studio tab, timeline position, and canvas position.
### Installing without a selected composition<AvailableFrom v="4.0.530" />
diff --git a/packages/docs/docs/studio-protocol/is-inside-studio.mdx b/packages/docs/docs/studio-protocol/is-inside-studio.mdx
index 331222d975..be6b9ead6c 100644
--- a/packages/docs/docs/studio-protocol/is-inside-studio.mdx
+++ b/packages/docs/docs/studio-protocol/is-inside-studio.mdx
@@ -56,6 +56,6 @@ This is a UI hint, not proof of Studio identity or a security boundary.
## See also
-- [Integrating an Element Library with Studio](/docs/studio-protocol/component-library-integration)
+- [Building Element Libraries](/docs/elements/libraries)
- [`setStudioDragData()`](/docs/studio-protocol/set-studio-drag-data)
- [Studio Protocol security](/docs/studio-protocol/security)
diff --git a/packages/docs/docs/studio-protocol/static-file-ref.mdx b/packages/docs/docs/studio-protocol/static-file-ref.mdx
index 1455a488a0..8b37c290c3 100644
--- a/packages/docs/docs/studio-protocol/static-file-ref.mdx
+++ b/packages/docs/docs/studio-protocol/static-file-ref.mdx
@@ -76,5 +76,5 @@ For assets that should remain remote after installation, pass a URL string inste
## See also
- [`createElementPayload()`](/docs/studio-protocol/create-element-payload)
-- [Integrating an Element Library with Studio](/docs/studio-protocol/component-library-integration)
+- [Building Element Libraries](/docs/elements/libraries)
- [`staticFile()`](/docs/staticfile)
diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.ts
index ea27fa44a5..5b9c01f11a 100644
--- a/packages/docs/sidebars.ts
+++ b/packages/docs/sidebars.ts
@@ -854,7 +854,6 @@ const sidebars: SidebarsConfig = {
id: 'studio-protocol/index',
},
items: [
- 'studio-protocol/component-library-integration',
'studio-protocol/create-element-payload',
'studio-protocol/static-file-ref',
'studio-protocol/build-open-in-remotion-new-url',
@@ -1457,7 +1456,6 @@ const sidebars: SidebarsConfig = {
label: 'Studio',
items: [
'studio/studio',
- 'studio/browse-elements',
'studio/open-in-editor',
'studio/shortcuts',
'studio/quick-switcher',
@@ -1465,10 +1463,10 @@ const sidebars: SidebarsConfig = {
'studio/interactivity',
'studio/interactivity-best-practices',
'studio/make-component-interactive',
- 'studio/creating-elements',
'studio/deploy-static',
'studio/deploy-server',
'studio/remotion-dev-new',
+ 'studio/browse-elements',
],
},
{
@@ -1594,6 +1592,15 @@ const sidebars: SidebarsConfig = {
'export-opentimeline',
],
},
+ {
+ type: 'category',
+ label: 'Elements',
+ link: {
+ type: 'doc',
+ id: 'elements',
+ },
+ items: ['elements', 'elements/libraries'],
+ },
{
type: 'html',
value:
diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.ts
index 7adb66aeb4..9ef571e747 100644
--- a/packages/docs/src/data/articles.ts
+++ b/packages/docs/src/data/articles.ts
@@ -4158,6 +4158,24 @@ export const articles = [
noAi: false,
slug: 'electron',
},
+ {
+ id: 'elements',
+ title: 'Creating Elements',
+ relativePath: 'docs/elements.mdx',
+ compId: 'articles-docs-elements',
+ crumb: null,
+ noAi: false,
+ slug: 'elements',
+ },
+ {
+ id: 'elements/libraries',
+ title: 'Building Element Libraries',
+ relativePath: 'docs/elements/libraries.mdx',
+ compId: 'articles-docs-elements-libraries',
+ crumb: null,
+ noAi: false,
+ slug: 'elements/libraries',
+ },
{
id: 'elevenlabs/detect-elevenlabs-transcript-format',
title: 'detectElevenLabsTranscriptFormat()',
@@ -8750,15 +8768,6 @@ export const articles = [
noAi: false,
slug: 'studio-protocol/build-open-in-remotion-new-url',
},
- {
- id: 'studio-protocol/component-library-integration',
- title: 'Integrating an Element Library with Studio',
- relativePath: 'docs/studio-protocol/component-library-integration.mdx',
- compId: 'articles-docs-studio-protocol-component-library-integration',
- crumb: '@remotion/studio-protocol',
- noAi: false,
- slug: 'studio-protocol/component-library-integration',
- },
{
id: 'studio-protocol/create-element-payload',
title: 'createElementPayload()',
@@ -8851,15 +8860,6 @@ export const articles = [
noAi: false,
slug: 'studio/browse-elements',
},
- {
- id: 'studio/creating-elements',
- title: 'Creating Elements',
- relativePath: 'docs/studio/creating-elements.mdx',
- compId: 'articles-docs-studio-creating-elements',
- crumb: null,
- noAi: false,
- slug: 'studio/creating-elements',
- },
{
id: 'studio/delete-static-file',
title: 'deleteStaticFile()',
diff --git a/packages/docs/static/generated/articles-docs-elements-libraries.png b/packages/docs/static/generated/articles-docs-elements-libraries.png
new file mode 100644
index 0000000000..84cef2aa79
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-elements-libraries.png differ
diff --git a/packages/docs/static/generated/articles-docs-studio-creating-elements.png b/packages/docs/static/generated/articles-docs-elements.png
similarity index 100%
rename from packages/docs/static/generated/articles-docs-studio-creating-elements.png
rename to packages/docs/static/generated/articles-docs-elements.png
diff --git a/packages/docs/static/generated/articles-docs-studio-protocol-component-library-integration.png b/packages/docs/static/generated/articles-docs-studio-protocol-component-library-integration.png
deleted file mode 100644
index 3ac5664f21..0000000000
Binary files a/packages/docs/static/generated/articles-docs-studio-protocol-component-library-integration.png and /dev/null differ
diff --git a/packages/docs/vercel.ts b/packages/docs/vercel.ts
index 43f1b2ba17..24e123da3d 100644
--- a/packages/docs/vercel.ts
+++ b/packages/docs/vercel.ts
@@ -65,6 +65,34 @@ export const config: VercelConfig = {
]),
],
redirects: [
+ routes.redirect('/docs/studio/creating-elements', '/docs/elements', {
+ permanent: true,
+ }),
+ routes.redirect('/docs/studio/creating-elements.md', '/docs/elements.md', {
+ permanent: true,
+ }),
+ routes.redirect(
+ '/docs/studio/element-libraries',
+ '/docs/elements/libraries',
+ {
+ permanent: true,
+ },
+ ),
+ routes.redirect(
+ '/docs/studio/element-libraries.md',
+ '/docs/elements/libraries.md',
+ {permanent: true},
+ ),
+ routes.redirect(
+ '/docs/studio-protocol/component-library-integration',
+ '/docs/elements/libraries',
+ {permanent: true},
+ ),
+ routes.redirect(
+ '/docs/studio-protocol/component-library-integration.md',
+ '/docs/elements/libraries.md',
+ {permanent: true},
+ ),
routes.redirect('/docs/reusability', '/docs/composing', {
permanent: true,
}),
@@ -90,14 +118,12 @@ export const config: VercelConfig = {
permanent: true,
}),
routes.redirect('/experimental_new', '/new', {permanent: true}),
- routes.redirect('/elements/guidelines', '/docs/studio/creating-elements', {
+ routes.redirect('/elements/guidelines', '/docs/elements', {
+ permanent: true,
+ }),
+ routes.redirect('/elements/guidelines.md', '/docs/elements.md', {
permanent: true,
}),
- routes.redirect(
- '/elements/guidelines.md',
- '/docs/studio/creating-elements.md',
- {permanent: true},
- ),
routes.redirect('/elements/contributing', '/docs/contributing/elements', {
permanent: true,
}),
diff --git a/packages/template-element-library/README.md b/packages/template-element-library/README.md
index 5f5938c1c0..5809dae3ab 100644
--- a/packages/template-element-library/README.md
+++ b/packages/template-element-library/README.md
@@ -35,7 +35,7 @@ Do these steps to add an Element:
The detail page, preview renderer, and Studio use the same source files. The gallery uses rendered previews. It does not use live Players.
-See the [Element guidelines](https://www.remotion.dev/docs/studio/creating-elements), [interactivity documentation](https://www.remotion.dev/docs/studio/interactivity), and [library integration guide](https://www.remotion.dev/docs/studio-protocol/component-library-integration) for layout, assets, dependencies, and installation requirements.
+See the [Element guidelines](https://www.remotion.dev/docs/elements), [interactivity documentation](https://www.remotion.dev/docs/studio/interactivity), and [library integration guide](https://www.remotion.dev/docs/elements/libraries) for layout, assets, dependencies, and installation requirements.
## Element lint rules
diff --git a/packages/template-element-library/eslint/assets-as-props.mjs b/packages/template-element-library/eslint/assets-as-props.mjs
index 3ef67c01da..43ca4e3876 100644
--- a/packages/template-element-library/eslint/assets-as-props.mjs
+++ b/packages/template-element-library/eslint/assets-as-props.mjs
@@ -15,7 +15,7 @@ export default {
type: "problem",
docs: {
description: "Pass Element assets through props instead of hardcoding them.",
- url: "https://www.remotion.dev/docs/studio-protocol/component-library-integration#asset-handling",
+ url: "https://www.remotion.dev/docs/elements/libraries#asset-handling",
},
schema: [],
messages: {
diff --git a/packages/template-element-library/eslint/no-global-styles.mjs b/packages/template-element-library/eslint/no-global-styles.mjs
index b0e719c0a0..a6108f35c9 100644
--- a/packages/template-element-library/eslint/no-global-styles.mjs
+++ b/packages/template-element-library/eslint/no-global-styles.mjs
@@ -5,7 +5,7 @@ export default {
type: "problem",
docs: {
description: "Keep Element styles local to the Element.",
- url: "https://www.remotion.dev/docs/studio/creating-elements#make-it-portable",
+ url: "https://www.remotion.dev/docs/elements#make-it-portable",
},
schema: [],
messages: {
diff --git a/packages/template-element-library/eslint/self-contained.mjs b/packages/template-element-library/eslint/self-contained.mjs
index 7df0851c48..b910b02b9f 100644
--- a/packages/template-element-library/eslint/self-contained.mjs
+++ b/packages/template-element-library/eslint/self-contained.mjs
@@ -5,7 +5,7 @@ export default {
type: "problem",
docs: {
description: "Keep copied Element source independent of project files.",
- url: "https://www.remotion.dev/docs/studio-protocol/component-library-integration#reuse-component-code",
+ url: "https://www.remotion.dev/docs/elements/libraries#1-share-the-element-source",
},
schema: [],
messages: {
diff --git a/packages/template-element-library/lib/markdown.ts b/packages/template-element-library/lib/markdown.ts
index ac3e3cf347..7cc6dab681 100644
--- a/packages/template-element-library/lib/markdown.ts
+++ b/packages/template-element-library/lib/markdown.ts
@@ -75,7 +75,7 @@ export const getElementMarkdown = ({
definition.installationMode === "wrapped"
? "Wrap the component in a Remotion Sequence and use the duration and dimensions below."
: "The component owns its Sequence. Pass timing props to the component rather than adding an outer Sequence.",
- "Use the installation metadata below for default props, dependencies, and assets. Asset references in initialProps must be resolved to local staticFile() calls after saving the declared assets to your public directory. See the [Element Library integration guide](https://www.remotion.dev/docs/studio-protocol/component-library-integration.md) for asset handling and Studio installation.",
+ "Use the installation metadata below for default props, dependencies, and assets. Asset references in initialProps must be resolved to local staticFile() calls after saving the declared assets to your public directory. See the [Element Library integration guide](https://www.remotion.dev/docs/elements/libraries.md) for asset handling and Studio installation.",
"## Installation metadata",
codeBlock(
"json",