Skip to content

ahmedmaknessi/sum-of-parts / .claude/skills/remotion-markup

remotion-markup

Verified

Content, animation and effects best practices

FileKindSize
3d.mdmarkdown2.2 KB
SKILL.mdskill md14.6 KB
agents/openai.yamlconfig310 B
assets/remotion-icon.svgother1.3 KB
audio-visualization.mdmarkdown4.8 KB
audio.mdmarkdown4.5 KB
calculate-metadata.mdmarkdown3.3 KB
compositions.mdmarkdown4.8 KB
connected-compositions.mdmarkdown4.8 KB
cropping.mdmarkdown1.2 KB
effects.mdmarkdown8.7 KB
embedding-videos.mdmarkdown3.7 KB
ffmpeg.mdmarkdown1.1 KB
gifs.mdmarkdown3.7 KB
google-fonts.mdmarkdown1.7 KB
html-in-canvas.mdmarkdown2.9 KB
images.mdmarkdown1.5 KB
light-leaks.mdmarkdown3.1 KB
local-fonts.mdmarkdown1.5 KB
lottie.mdmarkdown1.8 KB
measuring-dom-nodes.mdmarkdown995 B
measuring-text.mdmarkdown2.7 KB
motion-blur.mdmarkdown2.0 KB
multi-scene-video.mdmarkdown3.1 KB
parameters.mdmarkdown2.3 KB
remotion-maps/REFERENCE.mdmarkdown1.0 KB
remotion-maps/agents/openai.yamlconfig293 B
remotion-maps/assets/remotion-icon.svgother1.3 KB
remotion-maps/techniques/cesium/TECHNIQUE.mdmarkdown3.8 KB
remotion-maps/techniques/cesium/assets/CesiumFlythrough.tsxother8.7 KB
remotion-maps/techniques/cesium/assets/cesium-path.jsonconfig12.0 KB
remotion-maps/techniques/cesium/assets/city-path.jsonconfig223 B
remotion-maps/techniques/cesium/assets/example-Root.tsxother923 B
remotion-maps/techniques/cesium/assets/flight-path.tsscript1.2 KB
remotion-maps/techniques/cesium/assets/sample-river.geojsonother6.3 KB
remotion-maps/techniques/cesium/references/3d-data-sources.mdmarkdown1.4 KB
remotion-maps/techniques/cesium/references/3d-flyover-architecture.mdmarkdown7.7 KB
remotion-maps/techniques/cesium/references/3d-troubleshooting.mdmarkdown6.6 KB
remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjsscript5.4 KB
remotion-maps/techniques/mapbox/TECHNIQUE.mdmarkdown12.8 KB
remotion-maps/techniques/mapbox/references/render-stability.mdmarkdown3.6 KB
remotion-maps/techniques/maplibre/TECHNIQUE.mdmarkdown13.5 KB
remotion-maps/techniques/maplibre/references/render-stability.mdmarkdown3.6 KB
remotion-maps/techniques/maptiler/TECHNIQUE.mdmarkdown4.4 KB
remotion-maps/techniques/maptiler/assets/CountryLabel.tsxother1.8 KB
remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.tsscript2.1 KB
remotion-maps/techniques/maptiler/assets/RiverReveal.tsxother10.6 KB
remotion-maps/techniques/maptiler/assets/example-Root.tsxother1.0 KB
remotion-maps/techniques/maptiler/assets/sample-data/country-meta.jsonconfig325.3 KB
remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.jsonconfig12.8 KB
remotion-maps/techniques/maptiler/assets/tokens.tsscript1.2 KB
remotion-maps/techniques/maptiler/references/map-data-sources.mdmarkdown4.7 KB
remotion-maps/techniques/maptiler/references/map-explainer-architecture.mdmarkdown6.7 KB
remotion-maps/techniques/maptiler/references/map-geo-prep.mdmarkdown4.0 KB
remotion-maps/techniques/maptiler/references/render-stability.mdmarkdown3.6 KB
remotion-maps/techniques/maptiler/scripts/prep-geo.mjsscript7.4 KB
remotion-maps/techniques/static-map/TECHNIQUE.mdmarkdown1.1 KB
sequencing.mdmarkdown2.7 KB
sfx.mdmarkdown1.8 KB
silence-detection.mdmarkdown2.5 KB
text-highlights.mdmarkdown1.8 KB
timing-props.mdmarkdown3.5 KB
timing.mdmarkdown3.2 KB
transitions.mdmarkdown7.4 KB
video-editing.mdmarkdown5.1 KB
voiceover.mdmarkdown3.5 KB

connected-compositions.md

View on GitHub
# Connected compositions

Using the connected compositions pattern, a group of layers can get their own Studio timeline, like a precomposition in After Effects.

Use connected composition when a section has its own layers or timing, will be reused, or would be easier to edit and preview on its own.

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})`, following Remotion Interactivity.
   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 `<Series.Sequence>` or `<TransitionSeries.Sequence>`.
3. Register the **same component reference** with `<Composition component={...}>` in the root.
   Give it a unique `id` and the dimensions, fps, and natural duration needed to preview the scene on its own. A `<Folder>` can keep scene compositions together.

## Make the component independent of its parent

The parent is not mounted when a connected composition opens on its own.
Define required styles such as `fontFamily` inside the component, and avoid
parent-only context providers or mount side effects. Load custom fonts in its
module or a shared module it imports; see [Google fonts](google-fonts.md) and
[local fonts](local-fonts.md).

When extracting markup, carry over these dependencies. Verify its appearance
by opening it directly in a fresh Studio preview before opening the parent.

## Example

```tsx
// Chapter.tsx
import type React from 'react';
import {
  AbsoluteFill,
  Interactive,
  interpolate,
  useCurrentFrame,
  type InteractivitySchema,
} from 'remotion';

type ChapterProps = {
  readonly title: string;
  readonly style?: React.CSSProperties;
};

const ChapterInner: React.FC<ChapterProps> = ({title, style}) => {
  // Frame 0 is the start of this chapter, wherever the parent places it.
  const frame = useCurrentFrame();

  return (
    <AbsoluteFill
      style={{
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: 'white',
        color: 'black',
        fontFamily: 'Helvetica, Arial, sans-serif',
        ...style,
      }}
    >
      <h1
        style={{
          fontSize: 96,
          opacity: interpolate(frame, [0, 20], [0, 1], {
            extrapolateRight: 'clamp',
          }),
        }}
      >
        {title}
      </h1>
    </AbsoluteFill>
  );
};

const chapterSchema = {
  title: {type: 'text-content', default: '', description: 'Title'},
} as const satisfies InteractivitySchema;

export const Chapter = Interactive.withSchema({
  Component: ChapterInner,
  componentName: '<Chapter>',
  schema: chapterSchema,
  wrapInSequence: true,
});
```

`ChapterInner` only declares `title` and `style`.
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.
These are handled by the wrapper and are not passed to `ChapterInner`.
See Prefer interactive components with their own timelines.

```tsx
// MyVideo.tsx
import {Chapter} from './Chapter';

export const MyVideo = () => (
  <>
    <Chapter name="Opening" durationInFrames={90} title="Introduction" />
    <Chapter
      name="Feature"
      from={90}
      durationInFrames={120}
      title="New features"
    />
  </>
);
```

```tsx
// Root.tsx
import {Composition, Folder} from 'remotion';
import {MyVideo} from './MyVideo';
import {Chapter} from './Chapter';

export const RemotionRoot = () => (
  <>
    <Folder name="MyVideo-Scenes">
      <Composition
        id="Chapter"
        component={Chapter}
        width={1920}
        height={1080}
        fps={30}
        durationInFrames={120}
        defaultProps={{title: 'Introduction'}}
      />
    </Folder>
    <Composition
      id="MyVideo"
      component={MyVideo}
      width={1920}
      height={1080}
      fps={30}
      durationInFrames={210}
    />
  </>
);
```

Studio replaces the layers with a reference to the connected composition in the timeline.
Double-clicking a timeline item with one connected composition opens it at the corresponding frame.
Editing the shared component changes both views.

Example: If user has `MyVideo` selected, they can see 2 layers in the timeline, and can double-click one to go to the `Chapter` composition.

If the scene takes props, pass the intended values in the parent and use matching `defaultProps` on its standalone registration; registration does not automatically copy the parent's props.
Keep scene and parent fps and dimensions aligned unless their difference is intentional.
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 196kUpdated Claude CodeCodexVerifiedInstall