Skip to content

πŸŽ₯ Make videos programmatically with React

Docs: Document interactive element names (#8846)

Jonny Burger00e755ac449c
diff --git a/packages/docs/docs/studio/interactivity-best-practices.mdx b/packages/docs/docs/studio/interactivity-best-practices.mdx
index 1ca19a4b7a..b7644d66ef 100644
--- a/packages/docs/docs/studio/interactivity-best-practices.mdx
+++ b/packages/docs/docs/studio/interactivity-best-practices.mdx
@@ -28,6 +28,20 @@ For a custom component, see [Make a component interactive](/docs/studio/make-com
/remotion-best-practices Make this element editable in Remotion Studio. Use Interactive.* for tweakable HTML/SVG elements and keep editable style values inline.
```
+## Give interactive elements a descriptive name {#give-interactive-elements-a-descriptive-name}
+
+Add a `name` prop to interactive elements and custom interactive components.
+Use a short label that describes the element in the scene, not an empty string.
+
+The name is shown in the Studio timeline and helps agents identify the correct element when making visual edits.
+
+```tsx title="Interactive names"
+// πŸ‘ Easy to find in the Studio timeline and by agents
+<Interactive.Div name="Hero title" style={{fontSize: 80}}>
+ Launch day
+</Interactive.Div>
+```
+
## Keep editable values visible {#keep-editable-values-visible}
Put values that should be edited in the Studio directly into the JSX.
diff --git a/packages/skills/skills/remotion/SKILL.md b/packages/skills/skills/remotion/SKILL.md
index 9d82ab478c..95ebc4ce18 100644
--- a/packages/skills/skills/remotion/SKILL.md
+++ b/packages/skills/skills/remotion/SKILL.md
@@ -27,6 +27,7 @@ Animate properties using `useCurrentFrame()` and `interpolate()`. Prefer `interp
For animations that should be editable in Remotion Studio, keep the `interpolate()` call inline in the `style` prop and use individual CSS transform properties (`scale`, `translate`, `rotate`) instead of composing a `transform` string.
To make an element or custom component interactive in Remotion Studio, follow https://www.remotion.dev/docs/studio/make-component-interactive.
+When using `Interactive.*` or custom interactive components, set a descriptive `name` prop such as `name="Hero title"` so the element is identifiable in the Studio timeline and by agents. Do not use `name=""`.
```tsx
import { useCurrentFrame, Easing, interpolate, useVideoConfig } from "remotion";