Skip to content

🎥 Make videos programmatically with React

`remotion`: Add `Interactive.create()` for custom components

Jonny Burgere904d6196cd2
diff --git a/.agents/skills/remotion-new-markup/SKILL.md b/.agents/skills/remotion-new-markup/SKILL.md
index 4c6cddc0a8..9cb8eb6301 100644
--- a/.agents/skills/remotion-new-markup/SKILL.md
+++ b/.agents/skills/remotion-new-markup/SKILL.md
@@ -12,13 +12,13 @@ primitives that other components should inherit, rather than requiring an
additional wrapper around the content.
Use built-in interactive components, media components that support timing, or
-custom components created with `Interactive.withSchema({wrapInSequence: true})`.
+custom components created with `Interactive.create()`.
Pass `from`, `durationInFrames`, `trimBefore`, `playbackRate`, and
`name` directly to the component that supports them.
Avoid wrapping one timing-aware component in a `<Sequence>` just to schedule
or name it. For custom components, prefer adding timing through
-`Interactive.withSchema()` instead of introducing another sequence at each
+`Interactive.create()` instead of introducing another sequence at each
call site. Keep a direct `<Sequence>` only when a necessary timing boundary
cannot be expressed by the content components. Specialized containers such as
`<TransitionSeries.Sequence>` still serve their own sequencing behavior.
@@ -32,7 +32,7 @@ local frame and animation expressions evaluated in its parent.
Discourage `<AbsoluteFill>` as a scene or component wrapper. It often creates
an additional timeline layer that does not represent useful content. Prefer
-`Interactive.withSchema()` with `wrapInSequence: true` and
+`Interactive.create()` with
`layout: 'absolute-fill'`: the full-size container shares the component's
timeline item.
@@ -52,14 +52,12 @@ const SceneInner = ({title}: {readonly title: string}) => (
</>
);
-export const Scene = Interactive.withSchema({
+export const Scene = Interactive.create({
Component: SceneInner,
- componentName: 'Scene',
schema: {
title: {type: 'string', default: '', description: 'Title'},
...Interactive.backgroundSchema,
},
- wrapInSequence: true,
layout: 'absolute-fill',
});
@@ -78,4 +76,4 @@ bounds, such as text boxes or SVGs, can use the default `layout: 'none'` and
forward `style` to their visual root.
For further guidance, see [Remotion Interactivity](../remotion-interactivity/SKILL.md)
-and the [Interactive.withSchema() API](../../../packages/docs/docs/interactive-with-schema.mdx).
+and the [Interactive.create() API](../../../packages/docs/docs/interactive-create.mdx).
diff --git a/packages/core/src/Interactive.tsx b/packages/core/src/Interactive.tsx
index f81394955e..122343322f 100644
--- a/packages/core/src/Interactive.tsx
+++ b/packages/core/src/Interactive.tsx
@@ -282,22 +282,36 @@ type ComponentAcceptingStyle<
? unknown
: never);
-type WithSchema = {
+type WithSchemaOptions<
+ Options extends {schema: InteractivitySchema; componentName: string},
+ WithDefaults extends boolean,
+> = WithDefaults extends true
+ ? Omit<Options, 'schema' | 'componentName' | 'wrapInSequence'> &
+ Partial<Pick<Options, 'schema' | 'componentName'>> &
+ (Options extends {wrapInSequence: true}
+ ? {readonly wrapInSequence?: true}
+ : {readonly wrapInSequence: false})
+ : Options;
+
+type WithSchema<WithDefaults extends boolean = false> = {
<S extends InteractivitySchema, Component extends React.ElementType>(
- options: Omit<
- WithInteractivitySchemaOptions<
- S,
- React.ComponentPropsWithoutRef<Component>
- >,
- 'Component' | 'supportsEffects'
- > & {
- readonly Component: ComponentWithoutReservedProps<
- Component,
- WithSchemaReservedKey | 'style' | 'width' | 'height'
- >;
- readonly wrapInSequence: true;
- readonly layout: 'absolute-fill';
- },
+ options: WithSchemaOptions<
+ Omit<
+ WithInteractivitySchemaOptions<
+ S,
+ React.ComponentPropsWithoutRef<Component>
+ >,
+ 'Component' | 'supportsEffects'
+ > & {
+ readonly Component: ComponentWithoutReservedProps<
+ Component,
+ WithSchemaReservedKey | 'style' | 'width' | 'height'
+ >;
+ readonly wrapInSequence: true;
+ readonly layout: 'absolute-fill';
+ },
+ WithDefaults
+ >,
): React.FC<
React.ComponentPropsWithoutRef<Component> &
InteractiveBaseProps &
@@ -309,20 +323,23 @@ type WithSchema = {
}
>;
<S extends InteractivitySchema, Component extends React.ElementType>(
- options: Omit<
- WithInteractivitySchemaOptions<
- S,
- React.ComponentPropsWithoutRef<Component>
- >,
- 'Component' | 'supportsEffects'
- > & {
- readonly Component: ComponentAcceptingStyle<
- Component,
- WithSchemaReservedKey
- >;
- readonly wrapInSequence: true;
- readonly layout?: 'none';
- },
+ options: WithSchemaOptions<
+ Omit<
+ WithInteractivitySchemaOptions<
+ S,
+ React.ComponentPropsWithoutRef<Component>
+ >,
+ 'Component' | 'supportsEffects'
+ > & {
+ readonly Component: ComponentAcceptingStyle<
+ Component,
+ WithSchemaReservedKey
+ >;
+ readonly wrapInSequence: true;
+ readonly layout?: 'none';
+ },
+ WithDefaults
+ >,
): React.FC<
React.ComponentPropsWithRef<Component> &
InteractiveBaseProps &
@@ -330,10 +347,13 @@ type WithSchema = {
InteractiveCropProps
>;
<S extends InteractivitySchema, Props extends object>(
- options: WithInteractivitySchemaOptions<S, Props> & {
- readonly wrapInSequence?: false;
- readonly layout?: never;
- },
+ options: WithSchemaOptions<
+ WithInteractivitySchemaOptions<S, Props> & {
+ readonly wrapInSequence?: false;
+ readonly layout?: never;
+ },
+ WithDefaults
+ >,
): React.ComponentType<Props>;
};
@@ -474,7 +494,7 @@ const withSchema: WithSchema = (untypedOptions: unknown) => {
freeze={freeze}
hidden={hidden}
name={name ?? componentName}
- _remotionInternalDocumentationLink="https://www.remotion.dev/docs/interactive-with-schema"
+ _remotionInternalDocumentationLink="https://www.remotion.dev/docs/interactive-create"
showInTimeline={isCurrentComposition ? false : showInTimeline}
controls={controls}
_remotionInternalPremountDisplay={effectivePremountFor || null}
@@ -515,6 +535,27 @@ const withSchema: WithSchema = (untypedOptions: unknown) => {
>;
};
+const create: WithSchema<true> = (untypedOptions: unknown) => {
+ const options = untypedOptions as Omit<
+ WithSchemaImplementationOptions,
+ 'schema' | 'componentName'
+ > &
+ Partial<Pick<WithSchemaImplementationOptions, 'schema' | 'componentName'>>;
+
+ return (withSchema as (options: WithSchemaImplementationOptions) => React.FC)(
+ {
+ ...options,
+ wrapInSequence: options.wrapInSequence ?? true,
+ schema: options.schema ?? {},
+ componentName:
+ options.componentName ??
+ (options.Component.displayName ||
+ options.Component.name?.replace(/(.+)Inner$/, '$1') ||
+ 'Component'),
+ },
+ );
+};
+
const makeInteractiveElement = <Tag extends InteractiveTag>(
tag: Tag,
displayName: string,
@@ -685,7 +726,17 @@ export const Interactive = {
svgStrokeSchema,
premountSchema,
sequenceSchema,
+ /**
+ * @deprecated Use `Interactive.create()` instead: https://www.remotion.dev/docs/interactive-create
+ */
withSchema,
+ /**
+ * @description Creates a component with timing props and editable Studio controls.
+ * Sequence wrapping defaults to true, schema defaults to {}, and componentName is inferred.
+ * A trailing "Inner" is removed from inferred function names.
+ * @see [Documentation](https://www.remotion.dev/docs/interactive-create)
+ */
+ create,
_internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
A: makeInteractiveTextElement('a', '<Interactive.A>'),
Article: makeInteractiveTextElement('article', '<Interactive.Article>'),
diff --git a/packages/docs/docs/animating-properties.mdx b/packages/docs/docs/animating-properties.mdx
index 7e50b0c576..3406e32e69 100644
--- a/packages/docs/docs/animating-properties.mdx
+++ b/packages/docs/docs/animating-properties.mdx
@@ -10,7 +10,7 @@ import {AnimatingProperties, EasingDemo, PosterizationDemo} from '../components/
Animation works by changing properties over time.
For example: To fade the text in over two seconds, gradually change its `opacity` from `0` to `1`.
-```tsx twoslash {3, 9-12, 20-26} title="FadeIn.tsx"
+```tsx twoslash {3, 9-12, 20-23} title="FadeIn.tsx"
import { interpolate, Interactive, useCurrentFrame, useVideoConfig } from "remotion";
// ---cut---
const FadeInInner = () => {
@@ -32,11 +32,8 @@ const FadeInInner = () => {
);
};
-export const FadeIn = Interactive.withSchema({
+export const FadeIn = Interactive.create({
Component: FadeInInner,
- componentName: "FadeIn",
- schema: {},
- wrapInSequence: true,
layout: "absolute-fill",
});
```
diff --git a/packages/docs/docs/browser-bundler/create-browser-bundle-runtime.mdx b/packages/docs/docs/browser-bundler/create-browser-bundle-runtime.mdx
index 95d18467d7..fce7d6a6ab 100644
--- a/packages/docs/docs/browser-bundler/create-browser-bundle-runtime.mdx
+++ b/packages/docs/docs/browser-bundler/create-browser-bundle-runtime.mdx
@@ -73,7 +73,7 @@ Calling [`getBrowserComposition()`](/docs/browser-bundler/get-browser-compositio
## Source locations<AvailableFrom v="4.0.529" />
-Development bundles record the file, line and column of every JSX element. The runtime forwards this location to Remotion's built-in elements and to components wrapped with [`Interactive.withSchema()`](/docs/interactive-with-schema) when the bundle renders them. Rendering the composition with [`<Canvas>`](/docs/sdk/canvas) exposes the location of each mounted sequence through [`getCanvasSequenceSourceLocation()`](/docs/sdk/get-canvas-sequence-source-location), so an editor can map a track to its source node.
+Development bundles record the file, line and column of every JSX element. The runtime forwards this location to Remotion's built-in elements and to components wrapped with [`Interactive.create()`](/docs/interactive-create) when the bundle renders them. Rendering the composition with [`<Canvas>`](/docs/sdk/canvas) exposes the location of each mounted sequence through [`getCanvasSequenceSourceLocation()`](/docs/sdk/get-canvas-sequence-source-location), so an editor can map a track to its source node.
Only the bundle's own JSX carries locations. Elements created by dependencies resolved over HTTP do not, and their location is `null`. The host's React is not modified.
diff --git a/packages/docs/docs/components.mdx b/packages/docs/docs/components.mdx
index d54f4b8a98..8e17160afe 100644
--- a/packages/docs/docs/components.mdx
+++ b/packages/docs/docs/components.mdx
@@ -49,4 +49,4 @@ See the [API reference](/docs/api) for the full list of components, hooks and fu
## Make your own
-Use [`Interactive.withSchema()`](/docs/interactive-with-schema) to make your own React components editable in the Studio and inherit timing primitives.
+Use [`Interactive.create()`](/docs/interactive-create) to make your own React components editable in the Studio and inherit timing primitives.
diff --git a/packages/docs/docs/composing.mdx b/packages/docs/docs/composing.mdx
index 71dfcbe817..df11078ba5 100644
--- a/packages/docs/docs/composing.mdx
+++ b/packages/docs/docs/composing.mdx
@@ -46,7 +46,7 @@ Both titles are visible at the same time. Changing the component updates every i
## Add timing primitives
-Use [`Interactive.withSchema()`](/docs/interactive-with-schema) with `wrapInSequence: true` to add [timing props](/docs/timing).
+Use [`Interactive.create()`](/docs/interactive-create) to add [timing props](/docs/timing).
Rename the function to `TitleInner`, and export the wrapper:
```twoslash include timed-title
@@ -74,22 +74,16 @@ const TitleInner = ({children, color, style}: TitleProps) => (
);
// - inner
-export const Title = Interactive.withSchema({
+export const Title = Interactive.create({
Component: TitleInner,
- componentName: 'Title',
- schema: {},
- wrapInSequence: true,
});
```
```tsx twoslash title="Title.tsx"
// @include: timed-title-inner
// ---cut---
-export const Title = Interactive.withSchema({
+export const Title = Interactive.create({
Component: TitleInner,
- componentName: 'Title',
- schema: {},
- wrapInSequence: true,
});
```
@@ -130,14 +124,12 @@ Describe them in the `schema` to make them editable in the [Remotion Studio](/do
```tsx twoslash title="Title.tsx"
// @include: timed-title-inner
// ---cut---
-export const Title = Interactive.withSchema({
+export const Title = Interactive.create({
Component: TitleInner,
- componentName: 'Title',
schema: {
...Interactive.childrenSchema,
color: {type: 'color', default: '#0b84f3', description: 'Text color'},
},
- wrapInSequence: true,
});
```
@@ -178,14 +170,12 @@ const TitleInner = ({children, color}: TitleProps) => (
</div>
);
-export const Title = Interactive.withSchema({
+export const Title = Interactive.create({
Component: TitleInner,
- componentName: 'Title',
schema: {
...Interactive.childrenSchema,
color: {type: 'color', default: '#0b84f3', description: 'Text color'},
},
- wrapInSequence: true,
layout: 'absolute-fill',
});
```
@@ -212,14 +202,12 @@ const TitleInner = ({children, color}: TitleProps) => (
</div>
);
-export const Title = Interactive.withSchema({
+export const Title = Interactive.create({
Component: TitleInner,
- componentName: 'Title',
schema: {
...Interactive.childrenSchema,
color: {type: 'color', default: '#0b84f3', description: 'Text color'},
},
- wrapInSequence: true,
layout: 'absolute-fill',
});
```
@@ -249,7 +237,7 @@ You need to set a fixed width, height, and frame rate for the composition, even
## See also
-- [`Interactive.withSchema()`](/docs/interactive-with-schema)
+- [`Interactive.create()`](/docs/interactive-create)
- [`InteractivitySchema`](/docs/interactivity-schema)
- [Timing and trimming](/docs/timing)
- [Interactivity best practices](/docs/studio/interactivity-best-practices)
diff --git a/packages/docs/docs/create-effect.mdx b/packages/docs/docs/create-effect.mdx
index 32ef6154ed..4f25517feb 100644
--- a/packages/docs/docs/create-effect.mdx
+++ b/packages/docs/docs/create-effect.mdx
@@ -283,5 +283,5 @@ Defining an effect does not require a browser. Applying it requires a canvas com
- [`@remotion/effects`](/docs/effects/api)
- [`InteractivitySchema`](/docs/interactivity-schema)
-- [`Interactive.withSchema()`](/docs/interactive-with-schema)
+- [`Interactive.create()`](/docs/interactive-create)
- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/effects/create-effect.ts)
diff --git a/packages/docs/docs/interactive-create.mdx b/packages/docs/docs/interactive-create.mdx
new file mode 100644
index 0000000000..9df83fa983
--- /dev/null
+++ b/packages/docs/docs/interactive-create.mdx
@@ -0,0 +1,183 @@
+---
+image: /generated/articles-docs-interactive-create.png
+id: interactive-create
+title: Interactive.create()
+crumb: 'API'
+---
+
+# Interactive.create()<AvailableFrom v="4.0.536" />
+
+Wraps a React component with [timing props](/docs/timing) and editable controls in the [Remotion Studio](/docs/studio).
+
+Sequence wrapping is enabled by default. You can omit `schema` when the component has no custom controls.
+
+```tsx twoslash title="Circle.tsx"
+import type React from 'react';
+import {Interactive, type InteractivitySchema} from 'remotion';
+
+type CircleProps = {
+ readonly radius?: number;
+ readonly color?: string;
+ readonly style?: React.CSSProperties;
+};
+
+const circleSchema = {
+ radius: {
+ type: 'number',
+ min: 1,
+ step: 1,
+ default: 80,
+ description: 'Radius',
+ hiddenFromList: false,
+ },
+ color: {
+ type: 'color',
+ default: '#0b84ff',
+ description: 'Color',
+ },
+} as const satisfies InteractivitySchema;
+
+const CircleInner: React.FC<CircleProps> = ({radius = 80, color = '#0b84ff', style}) => {
+ return (
+ <div
+ style={{
+ ...style,
+ width: radius * 2,
+ height: radius * 2,
+ borderRadius: '50%',
+ backgroundColor: color,
+ }}
+ />
+ );
+};
+
+export const Circle = Interactive.create({
+ Component: CircleInner,
+ schema: circleSchema,
+});
+```
+
+The exported `Circle` component accepts `CircleProps`, [timing props](/docs/timing), [premount props](/docs/interactive#interactivepremountprops) and [cropping props](/docs/interactive#interactivecropprops).
+
+## API
+
+```ts twoslash title="Importing"
+import {Interactive} from 'remotion';
+```
+
+The options for `Interactive.create()` are:
+
+### `Component`
+
+The component to wrap.
+
+With sequence wrapping enabled and the default `layout: 'none'`, it must accept a `style?: React.CSSProperties` prop and apply it to its visual root.
+With `layout: 'absolute-fill'`, the wrapper applies styles to a full-size container instead. `Component` must not declare `style`, `width`, or `height` props; these belong to the wrapper.
+
+### `componentName`?
+
+The component name used by Studio and in validation messages.
+
+Defaults to `Component.displayName`, then `Component.name` with a trailing `Inner` removed, then `"Component"`. For example, a function named `CircleInner` produces the label `Circle`. A function named exactly `Inner` keeps its name. Explicit `componentName` and `displayName` values are used unchanged.
+
+Set this option when the inferred name is not descriptive, such as for an anonymous component or a component wrapped in `memo()` or `forwardRef()` without a `displayName`. The name of the variable receiving the returned component is not used.
+
+Set the returned component's [`name`](/docs/sequence#name) prop to label an individual instance.
+
+### `schema`?
+
+An [`InteractivitySchema`](/docs/interactivity-schema) that describes which custom props are editable in Remotion Studio. Defaults to `{}`. Props that are not in the schema still work in code.
+
+With sequence wrapping enabled, timing, premounting, cropping, and transform controls are included automatically. You do not need to add their schema fragments.
+
+See: [Make a component interactive](/docs/studio/make-component-interactive#create-a-schema)
+
+### `wrapInSequence`?
+
+Defaults to `true`. Wraps the component in a [`<Sequence>`](/docs/sequence) and adds timing, premounting, and cropping props. A [`useCurrentFrame()`](/docs/use-current-frame) call inside the component reads its local frame.
+
+Set to `false` only when the component already handles its own sequence and forwards its controls and timing props. In this mode, `Interactive.create()` preserves the component's props, uses the schema as supplied, and does not add timing props or standard schema fragments. `layout` must be omitted.
+
+### `supportsEffects`?
+
+Only available, and required, when `wrapInSequence` is `false`. Declares whether the component supports effect controls. Set to `false` for components that do not handle effects.
+
+### `layout`?
+
+Available when sequence wrapping is enabled. Defaults to `'none'`, which forwards styles to `Component` without adding a container.
+
+Set to `'absolute-fill'` to give the component a full-size, absolutely positioned container with `overflow: 'hidden'` by default. Set `style={{overflow: 'visible'}}` on the returned component to let content extend beyond its bounds. Styles, transforms, cropping, and premount styles apply to this container. It shares the component's timeline item, so no extra layout layer appears in Studio. The returned component also accepts `width` and `height` to size the container and set the dimensions reported by `useVideoConfig()`.
+
+The inner component can return a fragment and does not need to forward styles:
+
+```tsx twoslash title="Scene.tsx"
+import React from 'react';
+import {Video} from '@remotion/media';
+import {Interactive, useVideoConfig} from 'remotion';
+
+const SceneInner: React.FC = () => {
+ const {fps} = useVideoConfig();
+
+ return (
+ <>
+ <Video
+ src="https://remotion.media/jonnys-videos/roller-skis-new/footage/IMG_0466.mp4"
+ premountFor={fps}
+ objectFit="cover"
+ style={{width: '100%', height: '100%'}}
+ />
+ <Interactive.Div
+ name="Title"
+ style={{position: 'absolute', left: 80, bottom: 80, color: 'white', fontSize: 80}}
+ >
+ Under the trees
+ </Interactive.Div>
+ </>
+ );
+};
+
+export const Scene = Interactive.create({
+ Component: SceneInner,
+ layout: 'absolute-fill',
+});
+
+const Example = () => (
+ <Scene from={30} durationInFrames={90} premountFor={30} style={{opacity: 0.5}} />
+);
+```
+
+Keep `'none'` when styles need to apply directly to an element with its own size or layout, such as a text box, SVG, or button.
+
+### Return value
+
+Returns a React component with the original component's props and, by default, timing, premounting, and cropping props.
+
+With `layout: 'absolute-fill'`, the returned component also accepts `style`, `width`, and `height`. These props belong to the wrapper and must not be declared by the inner component. The inner component must not declare the timing, premounting, or cropping props managed by the wrapper either.
+
+### Ref forwarding
+
+With `layout: 'none'`, if `Component` accepts a ref, the returned component preserves its ref type and forwards the ref directly to `Component`.
+
+With `layout: 'absolute-fill'`, the ref points to the wrapper's `HTMLDivElement`.
+
+## Migrating from `Interactive.withSchema()`
+
+Replace `Interactive.withSchema()` with `Interactive.create()`. You can remove `wrapInSequence: true`, an empty `schema`, and a `componentName` that matches the inferred name. Keep explicit names when they should remain unchanged.
+
+If the old call omitted `wrapInSequence` or set it to `false`, explicitly pass `wrapInSequence: false` to preserve its behavior. The default changed from `false` to `true`.
+
+## Compatibility
+
+<CompatibilityTable chrome firefox safari nodejs="" bun="" serverlessFunctions="" clientSideRendering serverSideRendering player studio hideServers />
+
+Rendering support depends on `Component`. Editing timeline controls requires an editable Remotion Studio session.
+
+## See also
+
+- [Make a component interactive](/docs/studio/make-component-interactive)
+- [`InteractivitySchema`](/docs/interactivity-schema)
+- [`Interactive`](/docs/interactive)
+- [Interactivity best practices](/docs/studio/interactivity-best-practices)
+- [`createEffect()`](/docs/create-effect)
+- [`<Sequence>`](/docs/sequence)
+- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/core/src/Interactive.tsx)
diff --git a/packages/docs/docs/interactive-with-schema.mdx b/packages/docs/docs/interactive-with-schema.mdx
index 900047ddf1..d4dbd31afc 100644
--- a/packages/docs/docs/interactive-with-schema.mdx
+++ b/packages/docs/docs/interactive-with-schema.mdx
@@ -5,7 +5,11 @@ title: Interactive.withSchema()
crumb: 'API'
---
-# Interactive.withSchema()<AvailableFrom v="4.0.530" />
+# ~~Interactive.withSchema()~~<AvailableFrom v="4.0.530" />
+
+:::info Deprecated
+Use [`Interactive.create()`](/docs/interactive-create) instead, available from <AvailableFrom v="4.0.536" inline />. It enables sequence wrapping by default and makes `schema` and `componentName` optional. See the [migration guide](/docs/interactive-create#migrating-from-interactivewithschema) before replacing calls that omit `wrapInSequence`.
+:::
Wraps a React component so Remotion Studio shows it as interactive.
diff --git a/packages/docs/docs/interactive.mdx b/packages/docs/docs/interactive.mdx
index 8e77d987d8..0aefe3fc9e 100644
--- a/packages/docs/docs/interactive.mdx
+++ b/packages/docs/docs/interactive.mdx
@@ -66,7 +66,7 @@ therefore removes the stroke.
`Interactive` also exposes reusable schema fragments for component controls.
-Use them with [`Interactive.withSchema()`](/docs/interactive-with-schema).
+Use them with [`Interactive.create()`](/docs/interactive-create).
### `Interactive.baseSchema`<AvailableFrom v="4.0.479" />
@@ -74,7 +74,7 @@ Controls inherited from [`<Sequence>`](/docs/sequence):
`durationInFrames`, `from`, `trimBefore`, `playbackRate`, `freeze`, `hidden`, `name` and `showInTimeline`.
-[`Interactive.withSchema()`](/docs/interactive-with-schema) includes this schema and uses it for its [`<Sequence>`](/docs/sequence).
+[`Interactive.create()`](/docs/interactive-create) includes this schema and uses it for its [`<Sequence>`](/docs/sequence).
### `Interactive.transformSchema`<AvailableFrom v="4.0.479" />
@@ -82,7 +82,7 @@ Controls for transform-related style props:
`style.transformOrigin`, `style.translate`, `style.scale`, `style.rotate` and `style.opacity`.
-[`Interactive.withSchema()`](/docs/interactive-with-schema) includes this schema.
+[`Interactive.create()`](/docs/interactive-create) includes this schema.
Keep these values inline in JSX if the Studio should edit or keyframe them.
### `Interactive.cropSchema`<AvailableFrom v="4.0.500" />
@@ -91,7 +91,7 @@ Controls for cropping an element from each edge:
[`cropLeft`](/docs/sequence#cropleft), [`cropRight`](/docs/sequence#cropright), [`cropTop`](/docs/sequence#croptop) and [`cropBottom`](/docs/sequence#cropbottom).
-[`Interactive.withSchema()`](/docs/interactive-with-schema) includes this schema. With [`layout: 'absolute-fill'`](/docs/interactive-with-schema#layout), the crop applies to its container; with the default layout, it applies through the component's `style` prop.
+[`Interactive.create()`](/docs/interactive-create) includes this schema. With [`layout: 'absolute-fill'`](/docs/interactive-create#layout), the crop applies to its container; with the default layout, it applies through the component's `style` prop.
### `Interactive.textSchema`<AvailableFrom v="4.0.481" />
@@ -166,7 +166,7 @@ Controls for mounting behavior:
`premountFor` and `postmountFor`.
-[`Interactive.withSchema()`](/docs/interactive-with-schema) includes this schema and uses the props for its [`<Sequence>`](/docs/sequence).
+[`Interactive.create()`](/docs/interactive-create) includes this schema and uses the props for its [`<Sequence>`](/docs/sequence).
### `Interactive.sequenceSchema`<AvailableFrom v="4.0.479" />
@@ -174,11 +174,17 @@ The schema used by [`<Sequence>`](/docs/sequence).
It includes `Interactive.baseSchema` and a `layout` field. When `layout` is `"absolute-fill"`, the active fields include [`cropLeft`](/docs/sequence#cropleft), [`cropRight`](/docs/sequence#cropright), [`cropTop`](/docs/sequence#croptop), [`cropBottom`](/docs/sequence#cropbottom), `Interactive.transformSchema`, `Interactive.backgroundSchema`, `Interactive.borderSchema`, `Interactive.borderRadiusSchema` and `Interactive.premountSchema`.
-### `Interactive.withSchema()`<AvailableFrom v="4.0.479" />
+### `Interactive.create()`<AvailableFrom v="4.0.536" />
-Wraps a custom component so Remotion Studio can expose its props as timeline controls.
+Wraps a custom component with timing props and editable Studio controls. Sequence wrapping is enabled by default; `schema` and `componentName` are optional.
-See [`Interactive.withSchema()`](/docs/interactive-with-schema).
+See [`Interactive.create()`](/docs/interactive-create).
+
+### ~~`Interactive.withSchema()`~~<AvailableFrom v="4.0.479" />
+
+:::info Deprecated
+Use [`Interactive.create()`](/docs/interactive-create) instead. See the [migration guide](/docs/interactive-create#migrating-from-interactivewithschema) for the changed defaults.
+:::
## Types
diff --git a/packages/docs/docs/interactivity-schema.mdx b/packages/docs/docs/interactivity-schema.mdx
index 9d259016c9..c95c6a1b6e 100644
--- a/packages/docs/docs/interactivity-schema.mdx
+++ b/packages/docs/docs/interactivity-schema.mdx
@@ -9,7 +9,7 @@ crumb: 'API'
An `InteractivitySchema` describes controls that Remotion Studio can show in the timeline.
-It is used by [`Interactive.withSchema()`](/docs/interactive-with-schema) for component props and by [`createEffect()`](/docs/create-effect) for effect parameters.
+It is used by [`Interactive.create()`](/docs/interactive-create) for component props and by [`createEffect()`](/docs/create-effect) for effect parameters.
This schema is not a Zod schema. Use [Zod schemas](/docs/schemas) for [`<Composition>`](/docs/composition) props.
@@ -37,7 +37,7 @@ Keys may use dot notation. For example, a key named `style.opacity` reads from a
Timeline props inherited from [`<Sequence>`](/docs/sequence): [`durationInFrames`](/docs/sequence#durationinframes), [`from`](/docs/sequence#from), [`trimBefore`](/docs/sequence#trimbefore), [`playbackRate`](/docs/sequence#playbackrate), [`freeze`](/docs/sequence#freeze), [`hidden`](/docs/sequence#hidden), [`name`](/docs/sequence#name) and [`showInTimeline`](/docs/sequence#showintimeline).
-[`Interactive.withSchema()`](/docs/interactive-with-schema) includes this fragment and uses it for its [`<Sequence>`](/docs/sequence).
+[`Interactive.create()`](/docs/interactive-create) includes this fragment and uses it for its [`<Sequence>`](/docs/sequence).
### `Interactive.captionsSchema`<AvailableFrom v="4.0.500" />
@@ -49,13 +49,13 @@ This schema fragment is headless: it does not render an element or add layout, t
Transform-related style props: `style.transformOrigin`, `style.translate`, `style.scale`, `style.rotate` and `style.opacity`.
-[`Interactive.withSchema()`](/docs/interactive-with-schema) includes this fragment.
+[`Interactive.create()`](/docs/interactive-create) includes this fragment.
### `Interactive.cropSchema`<AvailableFrom v="4.0.500" />
Controls for cropping a component from each edge: [`cropLeft`](/docs/sequence#cropleft), [`cropRight`](/docs/sequence#cropright), [`cropTop`](/docs/sequence#croptop) and [`cropBottom`](/docs/sequence#cropbottom).
-[`Interactive.withSchema()`](/docs/interactive-with-schema) includes this fragment and applies the crop through the component's `style` prop.
+[`Interactive.create()`](/docs/interactive-create) includes this fragment and applies the crop through the component's `style` prop.
### `Interactive.textSchema`<AvailableFrom v="4.0.481" />
@@ -106,7 +106,7 @@ When `style.borderRadius` is a number or contains one to four pixel values, the
Mounting props: `premountFor` and `postmountFor`.
-[`Interactive.withSchema()`](/docs/interactive-with-schema) includes this fragment and uses the props for its [`<Sequence>`](/docs/sequence).
+[`Interactive.create()`](/docs/interactive-create) includes this fragment and uses the props for its [`<Sequence>`](/docs/sequence).
These schemas are for component props. Effects created with [`createEffect()`](/docs/create-effect) should define only their own effect parameters.
@@ -421,7 +421,7 @@ The schema describes plain data. Editing its controls requires Remotion Studio.
## See also
-- [`Interactive.withSchema()`](/docs/interactive-with-schema)
+- [`Interactive.create()`](/docs/interactive-create)
- [`Interactive`](/docs/interactive)
- [`createEffect()`](/docs/create-effect)
- [Defining a schema for your props](/docs/schemas)
diff --git a/packages/docs/docs/miscellaneous/snippets/freeze-portions.mdx b/packages/docs/docs/miscellaneous/snippets/freeze-portions.mdx
index ab2d30585d..5dcb47b6c4 100644
--- a/packages/docs/docs/miscellaneous/snippets/freeze-portions.mdx
+++ b/packages/docs/docs/miscellaneous/snippets/freeze-portions.mdx
@@ -28,11 +28,8 @@ const CounterInner: React.FC = () => {
);
};
-export const Counter = Interactive.withSchema({
+export const Counter = Interactive.create({
Component: CounterInner,
- componentName: 'Counter',
- schema: {},
- wrapInSequence: true,
layout: 'absolute-fill',
});
diff --git a/packages/docs/docs/player/premounting.mdx b/packages/docs/docs/player/premounting.mdx
index f1ff2afe78..6b37663337 100644
--- a/packages/docs/docs/player/premounting.mdx
+++ b/packages/docs/docs/player/premounting.mdx
@@ -118,12 +118,12 @@ Use the developer tools in the browser to see if an item is mounted to the DOM.
## Premounting a whole scene
-Create a scene with [`Interactive.withSchema()`](/docs/interactive-with-schema) and `layout: 'absolute-fill'`, then set `premountFor` to prepare its children together:
+Create a scene with [`Interactive.create()`](/docs/interactive-create) and `layout: 'absolute-fill'`, then set `premountFor` to prepare its children together:
```tsx twoslash title="PremountedScene.tsx"
import {Img, Interactive, staticFile} from 'remotion';
-const Scene = Interactive.withSchema({
+const Scene = Interactive.create({
Component: () => (
<>
<Img src={staticFile('logo.png')} width={200} />
@@ -131,8 +131,6 @@ const Scene = Interactive.withSchema({
</>
),
componentName: 'Scene',
- schema: {},
- wrapInSequence: true,
layout: 'absolute-fill',
});
diff --git a/packages/docs/docs/remotion/table-of-contents.tsx b/packages/docs/docs/remotion/table-of-contents.tsx
index 77efc47e03..1b3caf1fbd 100644
--- a/packages/docs/docs/remotion/table-of-contents.tsx
+++ b/packages/docs/docs/remotion/table-of-contents.tsx
@@ -156,9 +156,9 @@ export const TableOfContents: React.FC = () => {
<strong>{'VERSION'}</strong>
<div>Get the current version of Remotion</div>
</TOCItem>
- <TOCItem link="/docs/interactive-with-schema">
- <strong>Interactive.withSchema()</strong>
- <div>Expose component props as Studio timeline controls</div>
+ <TOCItem link="/docs/interactive-create">
+ <strong>Interactive.create()</strong>
+ <div>Add timing and Studio controls to a component</div>
</TOCItem>
</Grid>
</div>
diff --git a/packages/docs/docs/sdk/create-canvas-controller.mdx b/packages/docs/docs/sdk/create-canvas-controller.mdx
index 7168c10548..724a3323d2 100644
--- a/packages/docs/docs/sdk/create-canvas-controller.mdx
+++ b/packages/docs/docs/sdk/create-canvas-controller.mdx
@@ -32,7 +32,7 @@ Each track includes `sequence` registration data, `depth`, `nodePathInfo`, and t
#### sequence.controls<AvailableFrom v="4.0.529" />
-The interactivity data of the mounted element, or `null` for elements that do not register any. The `<Canvas>` populates it for built-in elements and for components wrapped with [`Interactive.withSchema()`](/docs/interactive-with-schema).
+The interactivity data of the mounted element, or `null` for elements that do not register any. The `<Canvas>` populates it for built-in elements and for components wrapped with [`Interactive.create()`](/docs/interactive-create).
`schema` is the element's interactivity schema, describing the editable props, their types, ranges and defaults. `runtimeValues` is a store of the current prop values in dot notation, for example `style.opacity`; read it with `getSnapshot()` and `subscribe()`. `supportsEffects` tells whether effects can be added to the element, `componentIdentity` identifies the component and `overrideId` identifies the JSX element the sequence was created from. Sequences rendered from the same element, for example in a `.map()` loop, share an `overrideId`.
diff --git a/packages/docs/docs/sequence.mdx b/packages/docs/docs/sequence.mdx
index ddee306202..7fa2afece6 100644
--- a/packages/docs/docs/sequence.mdx
+++ b/packages/docs/docs/sequence.mdx
@@ -17,13 +17,13 @@ These components use the same timing props:
- [`<Gif>`](/docs/gif/gif), [`<Lottie>`](/docs/lottie), [`<ThreeCanvas>`](/docs/three-canvas) and [`<RemotionRiveCanvas>`](/docs/rive/remotionrivecanvas).
- [`@remotion/shapes`](/docs/shapes), [`@remotion/rough-notation`](/docs/rough-notation/api) and [`<MacOSCursor>`](/docs/mac-cursors/mac-os-cursor).
- [`<Audio>`](/docs/media/audio) and [`<Video>`](/docs/media/video) from `@remotion/media`.
-- Custom components built with [`Interactive.withSchema()`](/docs/interactive-with-schema) that expose these props.
+- Custom components built with [`Interactive.create()`](/docs/interactive-create) that expose these props.
See [Timing and trimming](/docs/timing) for examples of using these props directly on components.
## Make a component inherit from Sequence
-Wrap a custom component with [`Interactive.withSchema()`](/docs/interactive-with-schema) to give it the timing props listed below.
+Wrap a custom component with [`Interactive.create()`](/docs/interactive-create) to give it the timing props listed below.
You can then set those props directly on the component, and Studio shows it as a single timeline layer.
See the linked API page for an example.
@@ -91,7 +91,7 @@ For example, a sequence that starts at frame 60 which is inside a sequence that
## Props
`<Sequence>` accepts children and the following props.
-Custom components built with [`Interactive.withSchema()`](/docs/interactive-with-schema) also receive timing props.
+Custom components built with [`Interactive.create()`](/docs/interactive-create) also receive timing props.
### `from?`
diff --git a/packages/docs/docs/studio-protocol/create-element-payload.mdx b/packages/docs/docs/studio-protocol/create-element-payload.mdx
index 49ff9884a9..ad21c88260 100644
--- a/packages/docs/docs/studio-protocol/create-element-payload.mdx
+++ b/packages/docs/docs/studio-protocol/create-element-payload.mdx
@@ -121,7 +121,7 @@ See [Design it for composition](/elements/guidelines#design-it-for-composition)
Set to `true` to let the Element be selected in the Styles tab when generating captions for a video or audio element. The default is `false`.
-Caption styles must use `installationMode: 'component-owned-sequence'`, accept a `captions` prop containing [`Caption[]`](/docs/captions/caption), and expose it through [`Interactive.captionsSchema`](/docs/interactivity-schema#interactivecaptionsschema). Use [`Interactive.withSchema()`](/docs/interactive-with-schema) with `wrapInSequence: true` to support `from`, `durationInFrames`, `trimBefore`, `playbackRate`, `premountFor`, and `postmountFor`.
+Caption styles must use `installationMode: 'component-owned-sequence'`, accept a `captions` prop containing [`Caption[]`](/docs/captions/caption), and expose it through [`Interactive.captionsSchema`](/docs/interactivity-schema#interactivecaptionsschema). Use [`Interactive.create()`](/docs/interactive-create) to support `from`, `durationInFrames`, `trimBefore`, `playbackRate`, `premountFor`, and `postmountFor`.
Studio replaces preview captions with the generated transcript. Timing props in `initialProps` are ignored: Studio copies timing from the selected media so the captions stay in sync. To place the captions at the bottom center, Studio adds `bottom: 120`, `left: '50%'`, and `transform: 'translateX(-50%)'` to `style`; values from `initialProps.style` take precedence. Other initial props are preserved. Choosing a style does not install it; clicking Generate captions starts transcription, after which Studio installs its source, dependencies, and assets. The flag describes compatibility, not trust: an Element can execute arbitrary code.
diff --git a/packages/docs/docs/studio/make-component-interactive.mdx b/packages/docs/docs/studio/make-component-interactive.mdx
index da9333ee7a..6385bcd9cb 100644
--- a/packages/docs/docs/studio/make-component-interactive.mdx
+++ b/packages/docs/docs/studio/make-component-interactive.mdx
@@ -8,11 +8,11 @@ crumb: 'Remotion Studio'
Remotion's default components are already interactive, meaning they can be selected and edited in the Studio.
-To make your component interactive too, wrap it with [`Interactive.withSchema()`](/docs/interactive-with-schema).
+To make your component interactive too, wrap it with [`Interactive.create()`](/docs/interactive-create), available from <AvailableFrom v="4.0.536" inline />. Sequence wrapping is enabled by default. Omit `schema` if you only need the built-in timing, transform, premounting, and cropping controls.
## Create the component
-For a scene that fills its parent, use [`layout: 'absolute-fill'`](/docs/interactive-with-schema#layout) when wrapping it with `Interactive.withSchema()`. Its inner component can return a fragment; the wrapper handles styles, transforms, premounting, and cropping.
+For a scene that fills its parent, use [`layout: 'absolute-fill'`](/docs/interactive-create#layout) when wrapping it with `Interactive.create()`. Its inner component can return a fragment; the wrapper handles styles, transforms, premounting, and cropping.
A component with its own size, like the badge below, keeps the default layout and forwards `style` to its visual root.
@@ -69,7 +69,7 @@ const badgeSchema = {
} as const satisfies InteractivitySchema;
```
-`Interactive.withSchema()` includes these schemas:
+`Interactive.create()` includes these schemas:
- [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema): [`durationInFrames`](/docs/sequence#durationinframes), [`from`](/docs/sequence#from), [`trimBefore`](/docs/sequence#trimbefore), [`playbackRate`](/docs/sequence#playbackrate), [`freeze`](/docs/sequence#freeze), [`hidden`](/docs/sequence#hidden), [`name`](/docs/sequence#name) and [`showInTimeline`](/docs/sequence#showintimeline).
- [`Interactive.premountSchema`](/docs/interactive#interactivepremountschema): [`premountFor`](/docs/sequence#premountfor) and [`postmountFor`](/docs/sequence#postmountfor).
@@ -92,7 +92,7 @@ Captions will become editable in the Studio.
## Turn on interactivity
-Call `Interactive.withSchema()` to link the schema to the component.
+Call `Interactive.create()` to link the schema to the component.
```tsx twoslash title="Badge.tsx"
import type React from 'react';
@@ -139,11 +139,9 @@ const badgeSchema = {
},
} as const satisfies InteractivitySchema;
-export const Badge = Interactive.withSchema({
+export const Badge = Interactive.create({
Component: BadgeInner,
- componentName: 'Badge',
schema: badgeSchema,
- wrapInSequence: true,
});
```
@@ -168,7 +166,7 @@ export const MyComp = () => {
## See also
- [Interactivity best practices](/docs/studio/interactivity-best-practices)
-- [`Interactive.withSchema()`](/docs/interactive-with-schema)
+- [`Interactive.create()`](/docs/interactive-create)
- [`InteractivitySchema`](/docs/interactivity-schema)
- [`Interactive`](/docs/interactive)
- [Studio interactivity](/docs/studio/interactivity)
diff --git a/packages/docs/elements/guidelines.mdx b/packages/docs/elements/guidelines.mdx
index 9a1b879750..ca372ed337 100644
--- a/packages/docs/elements/guidelines.mdx
+++ b/packages/docs/elements/guidelines.mdx
@@ -48,7 +48,7 @@ Use `installationMode: 'component-owned-sequence'` when Studio interactivity doe
- Canvas-based Elements where individual outlines cannot be passed to Studio
- Single-image overlays where the image itself cannot be edited
-Wrap 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.
+Wrap the exported component with [`Interactive.create()`](/docs/interactive-create). 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.
Export the schema-enabled component directly, without another forwarding wrapper.
@@ -78,7 +78,7 @@ Animate properties within the Element, such as translation, scale, and opacity;
Elements are source-code copies designed for direct editing, not managed dependencies. Expose useful Studio controls in the Element's `Interactive` schema, but there is no need to mirror every implementation detail as a public prop.
-Use [`Interactive.withSchema()`](/docs/interactive-with-schema) with `wrapInSequence: true` when useful controls can make the Element easier to edit. Controls should meaningfully edit the treatment; they may tune details but must not switch between unrelated visual styles.
+Use [`Interactive.create()`](/docs/interactive-create) when useful controls can make the Element easier to edit. Controls should meaningfully edit the treatment; they may tune details but must not switch between unrelated visual styles.
Give editable objects clear names, using a generic name such as `Container` for the main object and child controls only for separate editing targets.
diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.ts
index 3d9fd213e4..0e17dbf9a1 100644
--- a/packages/docs/sidebars.ts
+++ b/packages/docs/sidebars.ts
@@ -194,6 +194,7 @@ const sidebars: SidebarsConfig = {
'use-video-config',
'version',
'watchstaticfile',
+ 'interactive-create',
'interactive-with-schema',
],
},
diff --git a/packages/docs/src/data/articles.ts b/packages/docs/src/data/articles.ts
index 5649718135..baae6751e1 100644
--- a/packages/docs/src/data/articles.ts
+++ b/packages/docs/src/data/articles.ts
@@ -4608,6 +4608,15 @@ export const articles = [
noAi: false,
slug: 'install-whisper-cpp/transcribe',
},
+ {
+ id: 'interactive-create',
+ title: 'Interactive.create()',
+ relativePath: 'docs/interactive-create.mdx',
+ compId: 'articles-docs-interactive-create',
+ crumb: 'API',
+ noAi: false,
+ slug: 'interactive-create',
+ },
{
id: 'interactive-with-schema',
title: 'Interactive.withSchema()',
diff --git a/packages/docs/static/generated/articles-docs-interactive-create.png b/packages/docs/static/generated/articles-docs-interactive-create.png
new file mode 100644
index 0000000000..3777c23f88
Binary files /dev/null and b/packages/docs/static/generated/articles-docs-interactive-create.png differ
diff --git a/packages/skills/skills/remotion-interactivity/SKILL.md b/packages/skills/skills/remotion-interactivity/SKILL.md
index ad312daf9c..e1dc512ccb 100644
--- a/packages/skills/skills/remotion-interactivity/SKILL.md
+++ b/packages/skills/skills/remotion-interactivity/SKILL.md
@@ -15,7 +15,9 @@ If the markup is too complex for the Studio to make it interactive, then the val
## Prefer interactive components with their own timelines
-Use `Interactive.withSchema({wrapInSequence: true, layout: 'absolute-fill'})` for components that fill their parent. The wrapper provides their visual root and timeline item, and clips overflow by default, so the inner component can return a fragment. Put timing, dimensions, and per-instance styles on the exported component.
+Use `Interactive.create()` from Remotion 4.0.536 onwards. Sequence wrapping defaults to `true`, and `schema` defaults to `{}`, so omit both when no custom controls are needed. `componentName` is optional: it uses `Component.displayName`, then the function name with a trailing `Inner` removed, then `"Component"`. Explicit names and display names are preserved.
+
+Use `Interactive.create({layout: 'absolute-fill'})` for components that fill their parent. The wrapper provides their visual root and timeline item, and clips overflow by default, so the inner component can return a fragment. Put timing, dimensions, and per-instance styles on the exported component.
Keep visuals that belong together in the same component, so they move and trim together. An inner layout container can still provide alignment, clipping within a smaller area, or an animated group; a container that only fills the scene is usually unnecessary. Cards, text boxes, and SVGs with their own bounds can keep the default `layout: 'none'` and forward `style` to their visual root.
@@ -58,11 +60,9 @@ const sceneSchema = {
title: {type: 'string', default: '', description: 'Title'},
} as const satisfies InteractivitySchema;
-export const Scene = Interactive.withSchema({
+export const Scene = Interactive.create({
Component: SceneInner,
- componentName: 'Scene',
schema: sceneSchema,
- wrapInSequence: true,
layout: 'absolute-fill',
});
```
@@ -94,7 +94,7 @@ Every field needs a `default` and should have a `description`, which Studio show
Set `keyframable: false` to show a static control.
Expose content and per-instance appearance, such as the text and an accent color.
-Do not add fields for `style.translate`, `style.scale`, `style.rotate`, `style.transformOrigin` and `style.opacity`: `wrapInSequence: true` already adds them.
+Do not add fields for `style.translate`, `style.scale`, `style.rotate`, `style.transformOrigin` and `style.opacity`: `Interactive.create()` adds them by default.
To make CSS properties of the root editable per instance, spread the built-in schema fragments:
@@ -130,7 +130,7 @@ its parent. See
Register the same exported component reference that the parent renders. For the
example above, use `component={Scene}`, not `SceneInner` or an inline wrapper.
-With `wrapInSequence: true`, no extra `<Sequence>` is needed for the connection.
+`Interactive.create()` provides the sequence by default, so no extra `<Sequence>` is needed for the connection.
```tsx title="src/Root.tsx"
import {Composition} from 'remotion';
@@ -161,7 +161,7 @@ registration and extraction details.
Avoid a separate `<Sequence>` around one component that already accepts timing
props. Built-in interactive components and custom components made with
-`wrapInSequence: true` can receive `name`, `from`, `durationInFrames`,
+`Interactive.create()` can receive `name`, `from`, `durationInFrames`,
`trimBefore`, and `playbackRate` directly.
```tsx
diff --git a/packages/skills/skills/remotion-markup/SKILL.md b/packages/skills/skills/remotion-markup/SKILL.md
index 005ef40e8a..b907105bd4 100644
--- a/packages/skills/skills/remotion-markup/SKILL.md
+++ b/packages/skills/skills/remotion-markup/SKILL.md
@@ -28,7 +28,7 @@ Tailwind animation class will not render correctly, they need to be refactored.
Use `Easing.bezier()` and `Easing.spring()` to customize timing.
Structure your markup according to [Remotion Interactivity Best Practices](../remotion-interactivity/SKILL.md).
-Prefer `Interactive.withSchema({wrapInSequence: true, layout: 'absolute-fill'})`
+Prefer `Interactive.create({layout: 'absolute-fill'})`
for scenes with editable props. Their inner markup can return a fragment; the
wrapper handles layout and instance styles. Sized elements such as lower thirds
can keep the default layout and forward `style` to their own root. Register
@@ -235,11 +235,9 @@ const lowerThirdSchema = {
},
} as const satisfies InteractivitySchema;
-export const LowerThird = Interactive.withSchema({
+export const LowerThird = Interactive.create({
Component: LowerThirdInner,
- componentName: "LowerThird",
schema: lowerThirdSchema,
- wrapInSequence: true,
});
```
@@ -298,7 +296,7 @@ When a scene or group of layers deserves its own editable timeline, follow [conn
### Pre-compose action
-For a Studio request such as `Pre-compose Ambient glow (src/BarChart.tsx:134)`, find the selected sequence markup at the given location. Make a connected composition, following [connected-compositions.md](connected-compositions.md): extract the markup into a named component, preferably make it interactive with `Interactive.withSchema({wrapInSequence: true})`, and register the same exported component reference with a unique `<Composition>` in the root. Render the interactive component directly with its timing props, or as the only child of a sequence when that wrapper has a purpose. If the selected node is already a sequence, keep its props and extract its children. The registration needs dimensions, fps, duration, and `defaultProps` equivalent to its parent use. A component extraction without a registered composition does not complete a pre-compose request.
+For a Studio request such as `Pre-compose Ambient glow (src/BarChart.tsx:134)`, find the selected sequence markup at the given location. Make a connected composition, following [connected-compositions.md](connected-compositions.md): extract the markup into a named component, preferably make it interactive with `Interactive.create()`, and register the same exported component reference with a unique `<Composition>` in the root. Render the interactive component directly with its timing props, or as the only child of a sequence when that wrapper has a purpose. If the selected node is already a sequence, keep its props and extract its children. The registration needs dimensions, fps, duration, and `defaultProps` equivalent to its parent use. A component extraction without a registered composition does not complete a pre-compose request.
Carry inherited styles such as `fontFamily` and font loading into the extracted
component; see [parent independence](connected-compositions.md#make-the-component-independent-of-its-parent).
diff --git a/packages/skills/skills/remotion-markup/connected-compositions.md b/packages/skills/skills/remotion-markup/connected-compositions.md
index 37437d9aee..0a4303c7db 100644
--- a/packages/skills/skills/remotion-markup/connected-compositions.md
+++ b/packages/skills/skills/remotion-markup/connected-compositions.md
@@ -7,7 +7,7 @@ Use connected composition when a section has its own layers or timing, will be r
1. Put the scene's markup in a named React component.
Multiple internal layers and sequences can live inside it.
-2. Prefer making the component interactive with `Interactive.withSchema({wrapInSequence: true, layout: 'absolute-fill'})`, following [Remotion Interactivity](../remotion-interactivity/SKILL.md).
+2. Prefer making the component interactive with `Interactive.create({layout: 'absolute-fill'})`, following [Remotion Interactivity](../remotion-interactivity/SKILL.md).
Render the exported component directly in the parent with inline timing and editable props.
It does not need an additional `<Sequence>` to connect to its registration.
For consecutive scenes or transitions, render one direct instance as the only child of a `<TransitionSeries.Sequence>`.
@@ -75,17 +75,15 @@ const chapterSchema = {
title: {type: 'string', default: '', description: 'Title'},
} as const satisfies InteractivitySchema;
-export const Chapter = Interactive.withSchema({
+export const Chapter = Interactive.create({
Component: ChapterInner,
- componentName: 'Chapter',
schema: chapterSchema,
- wrapInSequence: true,
layout: 'absolute-fill',
});
```
`ChapterInner` only declares `title`. The Chapter background layer exposes the centering and background styles in the timeline; the wrapper handles instance styles and timing.
-Because of `wrapInSequence: true`, the exported `Chapter` additionally accepts the timing props of a `<Sequence>`: `from`, `durationInFrames`, `trimBefore`, `playbackRate`, `loop`, `freeze`, `hidden`, `name` and `showInTimeline`, plus `premountFor`, `postmountFor` and crop props.
+Because `Interactive.create()` wraps the component in a sequence by default, the exported `Chapter` additionally accepts the timing props of a `<Sequence>`: `from`, `durationInFrames`, `trimBefore`, `playbackRate`, `loop`, `freeze`, `hidden`, `name` and `showInTimeline`, plus `premountFor`, `postmountFor` and crop props.
These are handled by the wrapper and are not passed to `ChapterInner`.
See [Prefer interactive components with their own timelines](../remotion-interactivity/SKILL.md#prefer-interactive-components-with-their-own-timelines).
diff --git a/packages/skills/skills/remotion-markup/cropping.md b/packages/skills/skills/remotion-markup/cropping.md
index 1d4b4f7f73..8250166f65 100644
--- a/packages/skills/skills/remotion-markup/cropping.md
+++ b/packages/skills/skills/remotion-markup/cropping.md
@@ -7,7 +7,7 @@ The following components support `crop*` props:
- `<Sequence>` from `remotion`, when `layout="absolute-fill"`
- `<Interactive.*>` HTML and SVG elements from `remotion`
-- Custom components made with `Interactive.withSchema({wrapInSequence: true})` from `remotion`, using a managed `layout: 'absolute-fill'` root or forwarding `style` to their own visual root
+- Custom components made with `Interactive.create()` from `remotion`, using a managed `layout: 'absolute-fill'` root or forwarding `style` to their own visual root
- `<CanvasImage>` from `remotion`
- `<Img>` from `remotion`
- `<AnimatedImage>` from `remotion`
diff --git a/packages/skills/skills/remotion-markup/multi-scene-video.md b/packages/skills/skills/remotion-markup/multi-scene-video.md
index 79ab9e9b09..c256d27f67 100644
--- a/packages/skills/skills/remotion-markup/multi-scene-video.md
+++ b/packages/skills/skills/remotion-markup/multi-scene-video.md
@@ -99,4 +99,4 @@ With no transition, this example needs a 210-frame main composition.
If you add a transition, account for its overlap in the main duration; see [transitions](transitions.md).
Use `<TransitionSeries>` for consecutive scenes that do not need transitions.
-For independently placed scenes, prefer components made with `Interactive.withSchema({wrapInSequence: true})` and put `from` and `durationInFrames` directly on each instance.
+For independently placed scenes, prefer components made with `Interactive.create()` and put `from` and `durationInFrames` directly on each instance.
diff --git a/packages/skills/skills/remotion-markup/sequencing.md b/packages/skills/skills/remotion-markup/sequencing.md
index d052cbf5be..77d4c68c94 100644
--- a/packages/skills/skills/remotion-markup/sequencing.md
+++ b/packages/skills/skills/remotion-markup/sequencing.md
@@ -6,7 +6,7 @@ metadata:
---
Prefer timing props directly on built-in interactive components and custom
-components made with `Interactive.withSchema({wrapInSequence: true})`.
+components made with `Interactive.create()`.
Avoid wrapping a single timing-capable component in a redundant `<Sequence>`.
Put `name`, `from`, `durationInFrames`, `loop`, and `volume`
directly on `<Audio>` from `@remotion/media` whenever their combination gives the intended timing.
@@ -16,7 +16,7 @@ schema-wrapped components and [connected compositions](connected-compositions.md
for registering them with their own Studio timelines.
```tsx
-// Title and Subtitle are exported with Interactive.withSchema({wrapInSequence: true}).
+// Title and Subtitle are exported with Interactive.create().
<>
<Title name="Title" from={30} durationInFrames={60} />
<Subtitle name="Subtitle" from={60} durationInFrames={60} />
diff --git a/packages/skills/skills/remotion-markup/timing-props.md b/packages/skills/skills/remotion-markup/timing-props.md
index c6e4407c48..419822d00c 100644
--- a/packages/skills/skills/remotion-markup/timing-props.md
+++ b/packages/skills/skills/remotion-markup/timing-props.md
@@ -5,7 +5,7 @@ Use this `fps` for seconds-to-frames expressions on the JSX node, rather than
a fixed FPS constant.
The following timing props are supported by built-in components (`<AbsoluteFill>`, `<Interactive.*>`, `<Img>`, `<AnimatedImage>`, `<CanvasImage>`, `<HtmlInCanvas>`, `<Solid>`, `<Sequence>`, `<Track>` from `remotion`, `<Video>` and `<Audio>` from `@remotion/media`, `<Gif>`, and more).
-Custom components made with `Interactive.withSchema({wrapInSequence: true})` accept them too, see [Prefer interactive components with their own timelines](../remotion-interactivity/SKILL.md#prefer-interactive-components-with-their-own-timelines).
+Custom components made with `Interactive.create()` accept them too, see [Prefer interactive components with their own timelines](../remotion-interactivity/SKILL.md#prefer-interactive-components-with-their-own-timelines).
### `from`