Skip to content

πŸŽ₯ Make videos programmatically with React

Skills: Document interactivity schema fields

JonnyBurgerd280c2195688
diff --git a/packages/docs/docs/interactivity-schema.mdx b/packages/docs/docs/interactivity-schema.mdx
index 19037977ba..3ef86f42bd 100644
--- a/packages/docs/docs/interactivity-schema.mdx
+++ b/packages/docs/docs/interactivity-schema.mdx
@@ -105,6 +105,26 @@ Shows an on/off control.
Shows a color control. The value is a CSS color string.
+### `text-content`
+
+Shows a text control for a string prop, such as a title.
+
+Remotion Studio can edit a string literal, such as `title="Hello"`. Other expressions are shown as read-only.
+
+Text content fields are not keyframable.
+
+```ts twoslash title="schema.ts"
+import type {InteractivitySchema} from 'remotion';
+
+export const schema = {
+ title: {
+ type: 'text-content',
+ default: '',
+ description: 'Title',
+ },
+} as const satisfies InteractivitySchema;
+```
+
### `asset`
Shows a control for selecting an asset source.
@@ -134,6 +154,12 @@ Shows a font family control. The value is a CSS font family string.
When choosing a Google Font in Studio, Remotion adds the matching `loadFont()` call from `@remotion/google-fonts` to the composition file.
+### `font-weight`
+
+Shows a font weight control. The value is a number such as `700` or a CSS font weight string such as `"bold"`.
+
+Keyframes are written as [`interpolate()`](/docs/interpolate) calls with [`output: 'font-weight'`](/docs/interpolate#output).
+
### `enum`
Shows a select control. Each variant can define its own nested `InteractivitySchema`.
@@ -240,6 +266,12 @@ start: {
`innerScale` is optional. When present, Remotion Studio draws a second ellipse using the same center, width, height and rotation multiplied by that numeric field.
+### `svg-path`
+
+Shows an SVG path control. The value is an SVG path string, as used by the `d` attribute.
+
+Keyframes are written as [`interpolatePaths()`](/docs/paths/interpolate-paths) calls from `@remotion/paths`.
+
### `hidden`
Keeps a field in the schema without rendering a visible control.
@@ -264,11 +296,11 @@ The label shown in Remotion Studio.
Controls whether the field can be animated with keyframes.
-Default: `true` for `number`, `boolean`, `rotation-css`, `rotation-degrees`, `translate`, `transform-origin`, `scale`, `uv-coordinate` and `color` fields.
+Default: `true` for `number`, `boolean`, `rotation-css`, `rotation-degrees`, `translate`, `transform-origin`, `scale`, `uv-coordinate`, `color`, `font-weight` and `svg-path` fields.
Boolean fields use hold keyframes: their value changes at the next keyframe without blending. Boolean keyframes are available from <AvailableFrom v="4.0.530" inline />.
-`array` and `font-family` fields are not keyframable. Fields inside an `enum` variant schema can still be keyframed according to their own `keyframable` setting.
+`array`, `asset`, `font-family`, `text-content` and `remotion-captions` fields are not keyframable. Fields inside an `enum` variant schema can still be keyframed according to their own `keyframable` setting.
`enum` fields are not keyframable by default. From <AvailableFrom v="4.0.509" inline />, set `keyframable: true` to enable hold keyframes. Remotion Studio generates [`Easing.step1`](/docs/easing#step1) segments because enum values cannot be blended.
diff --git a/packages/skills/skills/remotion-interactivity/SKILL.md b/packages/skills/skills/remotion-interactivity/SKILL.md
index ca060a06fc..4ae022fa61 100644
--- a/packages/skills/skills/remotion-interactivity/SKILL.md
+++ b/packages/skills/skills/remotion-interactivity/SKILL.md
@@ -63,6 +63,48 @@ export const Chapter = Interactive.withSchema({
Forwarding the injected `style` inside the component is required; keep editable
styles inline at the component's call site.
+### Choose schema fields
+
+Each key in the schema is a prop that Studio can read and edit at the call site.
+Props that are not in the schema still work, but are not editable in Studio.
+Keys may use dot notation, such as `style.color`.
+
+| Type | Use for | Keyframable |
+| --- | --- | --- |
+| `text-content` | Text, such as a title | No |
+| `number` | Numbers, with optional `min`, `max`, `step`, `integer` | Yes |
+| `boolean` | On/off switches | Yes (hold) |
+| `color` | CSS color strings | Yes |
+| `enum` | A choice between `variants`, each with its own nested schema | Opt-in (hold) |
+| `array` | Lists of numbers, colors, enums and more | No |
+| `asset` | Media sources, with optional `assetType` | No |
+| `font-family` | CSS font family | No |
+| `font-weight` | Font weight | Yes |
+| `translate`, `scale`, `rotation-css`, `rotation-degrees`, `transform-origin` | Transforms | Yes |
+| `uv-coordinate` | A normalized `[x, y]` point on the element | Yes |
+| `svg-path` | SVG path data | Yes |
+| `remotion-captions` | `Caption[]` data | No |
+| `hidden` | A value kept out of the controls | β€” |
+
+Every field needs a `default` and should have a `description`, which Studio shows as the label.
+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.
+
+To make CSS properties of the root editable per instance, spread the built-in schema fragments:
+
+```tsx
+const cardSchema = {
+ ...Interactive.textSchema, // style.color, style.fontSize, style.fontWeight, ...
+ ...Interactive.backgroundSchema, // style.backgroundColor
+ ...Interactive.borderRadiusSchema, // style.borderRadius, ...
+} as const satisfies InteractivitySchema;
+```
+
+Also available: `Interactive.borderSchema`, and `Interactive.captionsSchema` for components that accept captions.
+See [`InteractivitySchema`](https://www.remotion.dev/docs/interactivity-schema) for all options.
+
### Register reusable components as connected compositions
Register substantial scenes and reusable components with their own layers or