spring-animation
Remotion spring physics for motion graphics video production. Bouncy entrances, elastic trails, orchestrated sequences, physics presets, and organic motion patterns that interpolate() alone cannot achieve.
What this skill does
## When to use
Use this skill when creating Remotion video compositions that need **spring physics** -- natural, organic motion with bounce, overshoot, and elastic settling.
**Use spring when you need:**
- Bouncy/elastic entrances (overshoot + settle)
- Organic deceleration (not linear, not eased -- physically modeled)
- Staggered trails with spring physics per element
- Number counters that overshoot then settle
- Scale/rotate with natural weight and inertia
- Enter + exit animations with spring math (`in - out`)
- Multi-property orchestration with different spring configs per property
**Use Remotion native `interpolate()` when:**
- Linear or eased motion with no bounce (fade, slide, wipe)
- Exact timing control (must end at precisely frame N)
- Clip-path animations
- Progress bars / deterministic counters
**Use GSAP (gsap-animation skill) when:**
- Text splitting (SplitText: chars/words/lines with mask)
- SVG stroke drawing (DrawSVG)
- SVG morphing (MorphSVG)
- Complex timeline orchestration with labels and position parameters
- ScrambleText decode effects
- Registered reusable effects
**Note:** `@react-spring/web` is NOT compatible with Remotion (it uses requestAnimationFrame internally). This skill uses Remotion's native `spring()` function which provides the same physics model in a frame-deterministic way.
---
## Core API
### spring()
Returns a value from 0 to 1 (can overshoot past 1 with low damping) based on spring physics simulation.
```tsx
import { spring, useCurrentFrame, useVideoConfig } from 'remotion';
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const value = spring({
frame,
fps,
config: {
damping: 10, // 1-200: higher = less bounce
stiffness: 100, // 1-200: higher = faster snap
mass: 1, // 0.1-5: higher = more inertia
},
});
```
### Config Parameters
| Parameter | Range | Default | Effect |
|-----------|-------|---------|--------|
| `damping` | 1-200 | 10 | Resistance. Low = bouncy, high = smooth |
| `stiffness` | 1-200 | 100 | Snap speed. High = fast, low = slow |
| `mass` | 0.1-5 | 1 | Weight/inertia. High = sluggish, low = light |
| `overshootClamping` | bool | false | Clamp at target (no overshoot) |
### Additional Options
| Option | Type | Effect |
|--------|------|--------|
| `delay` | number | Delay start by N frames (returns 0 until delay elapses) |
| `durationInFrames` | number | Force spring to settle within N frames |
| `reverse` | bool | Animate from 1 to 0 |
| `from` | number | Starting value (default 0) |
| `to` | number | Ending value (default 1) |
### measureSpring()
Calculate how many frames a spring config takes to settle. Essential for `<Sequence>` and composition duration.
```tsx
import { measureSpring } from 'remotion';
const frames = measureSpring({
fps: 30,
config: { damping: 10, stiffness: 100 },
}); // => number of frames until settled
```
---
## Physics Presets
```tsx
// src/spring-presets.ts
import { SpringConfig } from 'remotion';
export const SPRING = {
// Smooth, no bounce -- subtle reveals, background motion
smooth: { damping: 200 } as Partial<SpringConfig>,
// Snappy, minimal bounce -- UI elements, clean entrances
snappy: { damping: 20, stiffness: 200 } as Partial<SpringConfig>,
// Bouncy -- playful entrances, attention-grabbing
bouncy: { damping: 8 } as Partial<SpringConfig>,
// Heavy, slow -- dramatic reveals, weighty objects
heavy: { damping: 15, stiffness: 80, mass: 2 } as Partial<SpringConfig>,
// Wobbly -- elastic, cartoon-like overshoot
wobbly: { damping: 4, stiffness: 80 } as Partial<SpringConfig>,
// Stiff -- fast snap with tiny bounce
stiff: { damping: 15, stiffness: 300 } as Partial<SpringConfig>,
// Gentle -- slow, dreamy, organic
gentle: { damping: 20, stiffness: 40, mass: 1.5 } as Partial<SpringConfig>,
// Molasses -- very slow, heavy, barely bounces
molasses: { damping: 25, stiffness: 30, mass: 3 } as Partial<SpringConfig>,
// Pop -- strong overshoot for scale-in effects
pop: { damping: 6, stiffness: 150 } as Partial<SpringConfig>,
// Rubber -- exaggerated elastic bounce
rubber: { damping: 3, stiffness: 100, mass: 0.5 } as Partial<SpringConfig>,
} as const;
```
### Preset Visual Reference
| Preset | Bounce | Speed | Feel | Best For |
|--------|--------|-------|------|----------|
| `smooth` | None | Medium | Butter | Background, subtle reveals |
| `snappy` | Minimal | Fast | Crisp | UI elements, buttons |
| `bouncy` | Strong | Medium | Playful | Titles, icons, attention |
| `heavy` | Small | Slow | Weighty | Dramatic reveals, large objects |
| `wobbly` | Extreme | Medium | Cartoon | Playful, humorous |
| `stiff` | Tiny | Very fast | Mechanical | Data viz, precise motion |
| `gentle` | Minimal | Slow | Dreamy | Luxury, calm, organic |
| `molasses` | Almost none | Very slow | Heavy | Cinematic, suspense |
| `pop` | Strong | Fast | Punchy | Scale-in, badge, icon pop |
| `rubber` | Extreme | Fast | Elastic | Exaggerated, cartoon, fun |
---
## 1. Spring Entrance Patterns
### Basic Spring Entrance
```tsx
import { spring, interpolate, useCurrentFrame, useVideoConfig, AbsoluteFill } from 'remotion';
import { SPRING } from './spring-presets';
const SpringEntrance: React.FC<{
children: React.ReactNode;
preset?: keyof typeof SPRING;
delay?: number;
}> = ({ children, preset = 'bouncy', delay = 0 }) => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const progress = spring({ frame, fps, delay, config: SPRING[preset] });
const translateY = interpolate(progress, [0, 1], [60, 0]);
return (
<AbsoluteFill style={{
opacity: progress,
transform: `translateY(${translateY}px)`,
}}>
{children}
</AbsoluteFill>
);
};
```
### Scale Pop
```tsx
const ScalePop: React.FC<{
children: React.ReactNode;
delay?: number;
}> = ({ children, delay = 0 }) => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
// pop preset overshoots past 1, creating natural scale bounce
const scale = spring({ frame, fps, delay, config: SPRING.pop });
const opacity = spring({ frame, fps, delay, config: SPRING.smooth });
return (
<div style={{
transform: `scale(${scale})`,
opacity,
}}>
{children}
</div>
);
};
```
### Enter + Exit (Spring Math)
```tsx
const EnterExit: React.FC<{
children: React.ReactNode;
enterDelay?: number;
exitBeforeEnd?: number; // frames before composition end to start exit
}> = ({ children, enterDelay = 0, exitBeforeEnd = 30 }) => {
const frame = useCurrentFrame();
const { fps, durationInFrames } = useVideoConfig();
const enter = spring({ frame, fps, delay: enterDelay, config: SPRING.bouncy });
const exit = spring({
frame, fps,
delay: durationInFrames - exitBeforeEnd,
config: SPRING.snappy,
});
const scale = enter - exit; // 0 -> 1 -> 0
const opacity = enter - exit;
return (
<div style={{ transform: `scale(${scale})`, opacity }}>
{children}
</div>
);
};
```
---
## 2. Trail / Stagger Patterns
### Spring Trail (staggered entrance)
Mimics React Spring's `useTrail` -- each element enters with a frame delay.
```tsx
const SpringTrail: React.FC<{
items: React.ReactNode[];
staggerFrames?: number;
preset?: keyof typeof SPRING;
direction?: 'up' | 'down' | 'left' | 'right';
}> = ({ items, staggerFrames = 4, preset = 'bouncy', direction = 'up' }) => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const getOffset = (progress: number) => {
const distance = 50;
const remaining = interpolate(progress, [0, 1], [distance, 0]);
switch (direction) {
case 'up': return { transform: `translateY(${remaining}px)` };
case 'down': return { transform: `translateY(${-remaining}px)` };
case 'left': return { transform: `translateX(${remaining}px)` };
case 'right': return { transform: `translateX(${-remaining}px)` };
}
};
return (
<>
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.