🎥 Make videos programmatically with React
Update interactivity-best-practices.mdx
JonnyBurgere62828a89b95
diff --git a/packages/docs/docs/studio/interactivity-best-practices.mdx b/packages/docs/docs/studio/interactivity-best-practices.mdxindex dce2f1f015..0e865796b5 100644--- a/packages/docs/docs/studio/interactivity-best-practices.mdx+++ b/packages/docs/docs/studio/interactivity-best-practices.mdx@@ -16,17 +16,24 @@ By writing Remotion markup in a specific way, the [Remotion Studio](/docs/studioIf the markup is too complex for the Studio to make it interactive, then the values become grayed out.Use the [`/remotion-interactivity` skill](/docs/ai/skills#remotion-interactivity) skill to instruct an agent to restructure the markup to make it editable.-## Give every independently editable item its own JSX node+## Make an HTML element interactive using `Interactive`++Every HTML and SVG element such as `<div>` can be turned interactive using `Interactive`:++```tsx title="Interactive elements"+<Interactive.Div name="Greeting card" style={{fontSize: 80, padding: 24}}>+ Hello+</Interactive.Div>+```++This allows styles and keyframes to be set in the Studio. Be sensible, if a component has many elements, the timeline might get messy.++## Give every independently editable item its own node-The Studio edits the JSX source node that created an item. If multiple runtime-items come from the same JSX node, they share one source-editing target.+The Studio performs static analysis and allows editing the properties of nodes..For every clip, scene, layer or sequence that should be editable on its own,-write a separate JSX node and keep its editable props on that node. This applies-to built-in media components, [`<Sequence>`](/docs/sequence),-[`<Series.Sequence>`](/docs/series),-[`<TransitionSeries.Sequence>`](/docs/transitions/transitionseries) and custom-components.+write a separate JSX node and keep its editable props on that node.```tsx title="Separate source nodes"<Series>@@ -39,23 +46,10 @@ components.</Series>```-A `.map()` or another programmatic loop would create both runtime sequences-from one JSX source node. That is appropriate for repeated output that is-intentionally controlled as one template, such as visualization bars or-particles. It is not appropriate when the instances need independent names,-timing, ordering, deletion or duplication in the Studio.--## Make an HTML element interactive using `Interactive`--Every HTML and SVG element such as `<div>` can be turned interactive using `Interactive`:--```tsx title="Interactive elements"-<Interactive.Div name="Greeting card" style={{fontSize: 80, padding: 24}}>- Hello-</Interactive.Div>-```--This allows styles and keyframes to be set in the Studio. Be sensible, if a component has many elements, the timeline might get messy.+A `.map()` or another programmatic loop would display all nodes together as one item the Studio, allowing all properties to be edited collectively.+That is appropriate for repeated output that is intentionally controlled as one template, such as visualization bars or+particles.+It is not appropriate when the instances need independent names, timing, ordering, deletion or duplication in the Studio.## Give interactive elements a descriptive name