🎥 Make videos programmatically with React
Streamline interactive component guidance
JonnyBurgerf0b3b679c5f0
diff --git a/packages/docs/docs/sequence.mdx b/packages/docs/docs/sequence.mdxindex e079466e66..744c964629 100644--- a/packages/docs/docs/sequence.mdx+++ b/packages/docs/docs/sequence.mdx@@ -409,7 +409,7 @@ The eye icon in the Studio timeline toggles this prop and persists it to your so## Adding a ref-You can add a [React ref](https://react.dev/learn/manipulating-the-dom-with-refs) to a `<Sequence>` from version `v3.2.13` on. If you use TypeScript, you need to type it with `HTMLDivElement`:+You can add a [React ref](https://react.dev/learn/manipulating-the-dom-with-refs) to a `<Sequence>` from version `v3.2.13` on, if the sequence does not use `layout="none"`. If you use TypeScript, you need to type it with `HTMLDivElement`:```tsx twoslashimport {useRef} from 'react';@@ -427,10 +427,6 @@ const MyComp = () => {};```-Refs require the wrapper element created by `layout="absolute-fill"`. A `<Sequence layout="none">` rejects refs because it does not render a wrapper element.--A ref passed to a component returned by [`Interactive.withSchema()`](/docs/interactive-with-schema) is forwarded to the original component, if it accepts one.-## Note for `@remotion/three`A `<Sequence>` by default will return a `<div>` component which is not allowed inside a [`<ThreeCanvas>`](/docs/three-canvas).diff --git a/packages/docs/elements/guidelines.mdx b/packages/docs/elements/guidelines.mdxindex 598e12bb9b..9a1b879750 100644--- a/packages/docs/elements/guidelines.mdx+++ b/packages/docs/elements/guidelines.mdx@@ -50,15 +50,6 @@ Use `installationMode: 'component-owned-sequence'` when Studio interactivity doeWrap the exported component with [`Interactive.withSchema()`](/docs/interactive-with-schema) and set `wrapInSequence: true`. The user gets one timeline layer that they can trim. The component must accept a `style` prop and apply it to its visual root. The implementation does not appear as separate editable layers.-`Interactive.withSchema()`:--- Supplies [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema), [`Interactive.premountSchema`](/docs/interactive#interactivepremountschema), [`Interactive.cropSchema`](/docs/interactive#interactivecropschema), [`Interactive.transformSchema`](/docs/interactive#interactivetransformschema), the corresponding props and a `<Sequence layout="none">`.-- Premounting defaults to `0` frames in v4 and one second in v5. Pass `premountFor={0}` to opt out of the v5 default.-- The wrapper merges the incoming `style` with active premounting or postmounting styles and the crop style last.-- Pass `style` to the rendered element. Studio discovers its outline automatically. Set the dimensions in the component because Element metadata does not pass them as props.-- Frame-dependent animation inside the component respects `from`, `trimBefore`, `durationInFrames`, `playbackRate`, `loop`, and `freeze` because the wrapper's Sequence is outside it. Its local time is frozen at the first or last frame while premounted or postmounted.-- If the inner component accepts a React ref, refs passed to the exported component are forwarded directly to it.-Export the schema-enabled component directly, without another forwarding wrapper.Check in Studio that the exported instance appears as one layer, can be trimmed and can be moved. Do not use `component-owned-sequence` only to remove markup. Do not add padding only for a gallery preview.