Claude-skill-registry docs-demo
Add an interactive demo to the Remotion documentation. Use when creating a new <Demo> component for docs pages.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/docs-demo" ~/.claude/skills/majiayu000-claude-skill-registry-docs-demo && rm -rf "$T"
manifest:
skills/data/docs-demo/SKILL.mdsource content
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/.
Steps
-
Create a component in
(e.g.packages/docs/components/demos/
). It should be a standard React component using Remotion hooks likeMyDemo.tsx
anduseCurrentFrame()
.useVideoConfig() -
Register the demo in
:packages/docs/components/demos/types.ts- Import the component
- Export a
object with these fields:DemoType
: unique string used inid<Demo type="..." />
: the React componentcomp
/compWidth
: canvas dimensions (e.g. 1280x720)compHeight
: frame rate (typically 30)fps
: animation lengthdurationInFrames
: whether it plays automaticallyautoPlay
: array of interactive controls (can be emptyoptions
)[]
-
Add to the demos array in
:packages/docs/components/demos/index.tsx- Import the demo constant from
./types - Add it to the
arraydemos
- 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:
— slider withtype: 'numeric'
,min
,max
,stepdefault
— checkbox withtype: 'boolean'default
— dropdown withtype: 'enum'
array andvaluesdefault
— text input withtype: 'string'default
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: [], };