docs-demo
remotion-dev/remotion
Create interactive Remotion composition demos for documentation pages.
What is docs-demo?
Add interactive demos to Remotion documentation by creating React components that render inline using @remotion/player. Use this skill when building new <Demo> components for docs pages with optional interactive controls.
- Create React components in packages/docs/components/demos/ using Remotion hooks like useCurrentFrame() and useVideoConfig()
- Register demos in types.ts with canvas dimensions, frame rate, duration, and autoPlay settings
- Add interactive controls (numeric sliders, boolean checkboxes, enum dropdowns, text inputs) that pass values to components via inputProps
- Embed demos in MDX documentation pages using <Demo type="your-id" />
- Support effect-specific demos separately using <EffectsDemo> with registered schemas
How to install docs-demo
npx skills add https://github.com/remotion-dev/remotion --skill docs-demo- Remotion project with packages/docs structure
- @remotion/player installed
- React and TypeScript knowledge
How to use docs-demo
- 1.Create a new React component file in packages/docs/components/demos/ (e.g., MyDemo.tsx) using Remotion hooks
- 2.Define a DemoType object in packages/docs/components/demos/types.ts with id, comp, compWidth, compHeight, fps, durationInFrames, autoPlay, and options array
- 3.Import the demo constant and add it to the demos array in packages/docs/components/demos/index.tsx
- 4.Use the demo in MDX files with <Demo type="your-id" />
- 5.For effect demos, use <EffectsDemo type="effects-..." /> and register in packages/docs/components/effects-demos/registry.ts with the real effect schema
Use cases
- Building an animated transition demo with interactive speed and easing controls
- Creating a text animation showcase with adjustable font size and color options
- Demonstrating video composition techniques with interactive duration and frame rate settings
- Adding interactive effect previews to documentation with real effect schemas
- Showcasing Remotion player capabilities with auto-play and manual control options
- Remotion documentation maintainers
- Library developers creating interactive component showcases
- Technical writers building interactive API documentation
- Contributors adding new demo components to Remotion docs
docs-demo FAQ
Four types: numeric (slider with min/max/step), boolean (checkbox), enum (dropdown with values array), and string (text input). Each option requires a name and optional setting ('no', 'default-enabled', or 'default-disabled').
Option values are passed as inputProps. Access them as regular React props in your component.
<Demo> is for general Remotion composition demos with custom options. <EffectsDemo> is specifically for effect demos and requires registration in the effects-demos registry with the real effect schema.
All demo components should be created in packages/docs/components/demos/ as standard React components.
You can use standard Remotion hooks like useCurrentFrame() and useVideoConfig() to access frame information and video configuration.
Full instructions (SKILL.md)
Source of truth, from remotion-dev/remotion.
name: docs-demo description: Add an interactive demo to the Remotion documentation. Use when creating a new <Demo> component for docs pages.
Adding an Interactive Demo to Docs
Interactive demos render a Remotion composition inline in documentation pages using @remotion/player. They live in packages/docs/components/demos/.
Effect demos are separate: use <EffectsDemo type="effects-..." /> and register them in packages/docs/components/effects-demos/registry.ts with the real effect schema, not the generic <Demo> options array.
Steps
-
Create a component in
packages/docs/components/demos/(e.g.MyDemo.tsx). It should be a standard React component using Remotion hooks likeuseCurrentFrame()anduseVideoConfig(). -
Register the demo in
packages/docs/components/demos/types.ts:- Import the component
- Export a
DemoTypeobject with these fields:id: unique string used in<Demo type="..." />comp: the React componentcompWidth/compHeight: canvas dimensions (e.g. 1280x720)fps: frame rate (typically 30)durationInFrames: animation lengthautoPlay: whether it plays automaticallyoptions: array of interactive controls (can be empty[])
-
Add to the demos array in
packages/docs/components/demos/index.tsx:- Import the demo constant from
./types - Add it to the
demosarray
- Import the demo constant from
-
Use in MDX with
<Demo type="your-id" />
Options
Options add interactive controls below the player. Each option needs name and optional ('no', 'default-enabled', or 'default-disabled').
Supported types:
type: 'numeric'— slider withmin,max,step,defaulttype: 'boolean'— checkbox withdefaulttype: 'enum'— dropdown withvaluesarray anddefaulttype: 'string'— text input withdefault
Option values are passed to the component as inputProps. Access them as regular React props.
Example registration
export const myDemo: DemoType = {
comp: MyDemoComp,
compHeight: 720,
compWidth: 1280,
durationInFrames: 150,
fps: 30,
id: 'my-demo',
autoPlay: true,
options: [],
};
Related skills
More from remotion-dev/remotion and the wider catalog.

make-pr
Open a pull request for the current feature

video-report
Generate diagnostic reports for non-working videos by rendering them with verbose logging.

web-renderer-test
Add visual snapshot tests to Remotion's web renderer using vitest and fixture-based components.

writing-docs
Guidelines for writing and editing Remotion documentation in MDX format.

remotion-best-practices
Best practices and patterns for building videos with Remotion in React

rendercv
>-