Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions skills/remotion/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Replace `my-video` with a suitable project name.

Before designing visual scenes, layouts, promos, motion graphics, or text-heavy videos, load [rules/video-layout.md](rules/video-layout.md) for video-first layout and text sizing guidance.

Animate properties using `useCurrentFrame()` and `interpolate()`. Prefer `interpolate()` over `spring()` unless physics-based motion is explicitly needed. Use `Easing.bezier()` to customize timing, including jumpy or overshooting motion.
Animate properties using `useCurrentFrame()` and `interpolate()`. Prefer `interpolate()` over `spring()` unless the user explicitly asks for physics-based motion. Use `Easing.bezier()` to customize timing, including jumpy or overshooting motion.

For animations that should be editable in Remotion Studio, keep the `interpolate()` call inline in the `style` prop and use individual CSS transform properties (`scale`, `translate`, `rotate`) instead of composing a `transform` string.

Expand Down Expand Up @@ -118,7 +118,14 @@ To limit the duration of an element, use `durationInFrames` of `<Sequence>`.
`<Sequence>` by default is an absolute fill. For inline content, use `layout="none"`.

```tsx
import { Sequence } from "remotion";
import {
AbsoluteFill,
Easing,
Sequence,
interpolate,
useCurrentFrame,
useVideoConfig,
} from "remotion";

export const Title = () => {
const frame = useCurrentFrame();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ const Highlight: React.FC<{
const frame = useCurrentFrame();
const {fps} = useVideoConfig();

// spring() is used here (rather than interpolate()) because the wipe
// should settle with a natural, slightly elastic motion driven by
// damping — a physics-based feel that interpolate()'s explicit easing
// curves can't easily reproduce.
const highlightProgress = spring({
fps,
frame,
Expand Down