🎥 Make videos programmatically with React
reduce amount of skills
Jonny Burgerdd5e785f8ff7
diff --git a/packages/skills/skills/example-chat-messages/SKILL.md b/packages/skills/skills/example-chat-messages/SKILL.mddeleted file mode 100644index 5336a7402b..0000000000--- a/packages/skills/skills/example-chat-messages/SKILL.md+++ /dev/null@@ -1,22 +0,0 @@-----name: example-chat-messages-description: Complete working example of WhatsApp-style chat bubbles with bouncy spring animations and staggered message entrances.-metadata:- category: Text- durationInFrames: 180- fps: 30------## Chat Messages Example--WhatsApp-style bouncy message bubbles with staggered entrances.--See the full implementation in [assets/example.tsx](assets/example.tsx).--### Key Features--- Proper chat alignment (sent right, received left)-- Spring physics for bouncy entrance-- Staggered message appearance with delays-- Scale and slide animations combined-- WhatsApp-style color schemediff --git a/packages/skills/skills/example-chat-messages/assets/example.tsx b/packages/skills/skills/example-chat-messages/assets/example.tsxdeleted file mode 100644index 6036619c11..0000000000--- a/packages/skills/skills/example-chat-messages/assets/example.tsx+++ /dev/null@@ -1,70 +0,0 @@-import { AbsoluteFill, useCurrentFrame, useVideoConfig, spring } from "remotion";--export const MyAnimation = () => {- const frame = useCurrentFrame();- const { fps } = useVideoConfig();-- const messages = [- { text: "Hey! How are you?", isMe: false, delay: 0 },- { text: "I'm good! Working on Remotion", isMe: true, delay: 45 },- { text: "That's awesome! Show me!", isMe: false, delay: 90 },- { text: "Check this out!", isMe: true, delay: 135 },- ];-- const messageHeight = 100;-- return (- <AbsoluteFill- style={{- backgroundColor: "#0a0a0a",- padding: 60,- justifyContent: "flex-end",- paddingBottom: 80,- }}- >- <div style={{ width: "100%", position: "relative" }}>- {messages.map((msg, i) => {- const progress = spring({- frame: frame - msg.delay,- fps,- config: { damping: 12, stiffness: 200 },- });-- if (frame < msg.delay) return null;-- const messagesAfter = messages.filter((m, idx) => idx > i && frame >= m.delay).length;- const yOffset = messagesAfter * messageHeight;-- const xOffset = msg.isMe ? (1 - progress) * 100 : (1 - progress) * -100;-- return (- <div- key={i}- style={{- display: "flex",- justifyContent: msg.isMe ? "flex-end" : "flex-start",- marginBottom: 24,- opacity: progress,- transform: `translateX(${xOffset}px) translateY(${-yOffset}px) scale(${0.8 + progress * 0.2})`,- }}- >- <div- style={{- backgroundColor: msg.isMe ? "#25D366" : "#2a2a2a",- color: "#fff",- padding: "20px 28px",- borderRadius: 24,- fontSize: 42,- fontFamily: "system-ui, sans-serif",- maxWidth: "70%",- }}- >- {msg.text}- </div>- </div>- );- })}- </div>- </AbsoluteFill>- );-};diff --git a/packages/skills/skills/example-staggered-list/SKILL.md b/packages/skills/skills/example-staggered-list/SKILL.mddeleted file mode 100644index b371e66651..0000000000--- a/packages/skills/skills/example-staggered-list/SKILL.md+++ /dev/null@@ -1,22 +0,0 @@-----name: example-staggered-list-description: Complete working example of a feature list with staggered spring entrances and slide animations.-metadata:- category: Other- durationInFrames: 120- fps: 30------## Staggered List Example--Feature list with staggered spring entrances and subtle slide animations.--See the full implementation in [assets/example.tsx](assets/example.tsx).--### Key Features--- Staggered spring animations for each list item-- Slide-in effect from the right-- Icon boxes with accent color background-- Title and description for each feature-- Spring-animated title entrancediff --git a/packages/skills/skills/example-staggered-list/assets/example.tsx b/packages/skills/skills/example-staggered-list/assets/example.tsxdeleted file mode 100644index 1f14daec79..0000000000--- a/packages/skills/skills/example-staggered-list/assets/example.tsx+++ /dev/null@@ -1,111 +0,0 @@-import { useCurrentFrame, useVideoConfig, AbsoluteFill, interpolate, spring } from "remotion";--export const MyAnimation = () => {- /*- * Feature list with staggered spring entrances and subtle hover-like highlights.- */- const frame = useCurrentFrame();- const { fps } = useVideoConfig();-- const COLOR_BG = "#0f0f0f";- const COLOR_TEXT = "#ffffff";- const COLOR_ACCENT = "#6366f1";- const COLOR_MUTED = "#a1a1aa";-- const TITLE = "Why Choose Us";- const FEATURES = [- { icon: "\u26A1", title: "Lightning Fast", desc: "Built for speed from the ground up" },- { icon: "\uD83D\uDD12", title: "Secure by Default", desc: "Enterprise-grade security included" },- { icon: "\uD83C\uDFA8", title: "Beautiful Design", desc: "Crafted with attention to detail" },- { icon: "\uD83D\uDE80", title: "Scale Infinitely", desc: "Grows with your business needs" },- ];-- const TITLE_FONT_SIZE = 48;- const ITEM_FONT_SIZE = 28;- const DESC_FONT_SIZE = 18;- const ICON_SIZE = 48;- const ITEM_GAP = 24;- const PADDING = 60;-- const TITLE_START = 0;- const ITEMS_START = 20;- const STAGGER_DELAY = 12;- const SLIDE_DISTANCE = 30;-- const titleProgress = spring({- frame: frame - TITLE_START,- fps,- config: { damping: 20, stiffness: 100 }- });-- return (- <AbsoluteFill style={{- backgroundColor: COLOR_BG,- padding: PADDING,- display: "flex",- flexDirection: "column",- justifyContent: "center",- fontFamily: "Inter, sans-serif"- }}>- {/* Title */}- <div style={{- fontSize: TITLE_FONT_SIZE,- fontWeight: 700,- color: COLOR_TEXT,- marginBottom: 40,- opacity: titleProgress,- transform: `translateY(${(1 - titleProgress) * 20}px)`- }}>- {TITLE}- </div>-- {/* Feature list */}- <div style={{ display: "flex", flexDirection: "column", gap: ITEM_GAP }}>- {FEATURES.map((feature, i) => {- const itemStart = ITEMS_START + i * STAGGER_DELAY;- const itemProgress = spring({- frame: frame - itemStart,- fps,- config: { damping: 15, stiffness: 120 }- });- const opacity = interpolate(itemProgress, [0, 1], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });- const translateX = interpolate(itemProgress, [0, 1], [SLIDE_DISTANCE, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });-- return (- <div- key={i}- style={{- display: "flex",- alignItems: "center",- gap: 20,- opacity,- transform: `translateX(${translateX}px)`- }}- >- <div style={{- width: ICON_SIZE,- height: ICON_SIZE,- borderRadius: 12,- backgroundColor: COLOR_ACCENT + "20",- display: "flex",- alignItems: "center",- justifyContent: "center",- fontSize: 24- }}>- {feature.icon}- </div>- <div>- <div style={{ fontSize: ITEM_FONT_SIZE, fontWeight: 600, color: COLOR_TEXT }}>- {feature.title}- </div>- <div style={{ fontSize: DESC_FONT_SIZE, color: COLOR_MUTED, marginTop: 4 }}>- {feature.desc}- </div>- </div>- </div>- );- })}- </div>- </AbsoluteFill>- );-};diff --git a/packages/skills/skills/messaging/SKILL.md b/packages/skills/skills/messaging/SKILL.mddeleted file mode 100644index cc7dad44ce..0000000000--- a/packages/skills/skills/messaging/SKILL.md+++ /dev/null@@ -1,119 +0,0 @@-----name: messaging-description: Chat and messaging UI patterns for Remotion. Use when creating WhatsApp conversations, iMessage, chat bubbles, text messages, DMs, or messenger-style interfaces.-metadata:- impact: HIGH- tags: chat, messaging, whatsapp, imessage, bubbles, conversation------## Chat Bubble Layout--Use flexbox to align sent messages right, received messages left.--**Incorrect (all bubbles centered):**--```tsx-<div style={{ textAlign: "center" }}>- {messages.map(msg => <div>{msg.text}</div>)}-</div>-```--**Correct (proper chat alignment):**--```tsx-<div style={{- display: "flex",- flexDirection: "column",- justifyContent: "flex-end",- padding: 40-}}>- {messages.map((msg, i) => (- <div style={{- display: "flex",- justifyContent: msg.sent ? "flex-end" : "flex-start",- marginTop: 12- }}>- <div style={{- maxWidth: "70%",- padding: "12px 16px",- borderRadius: 16,- backgroundColor: msg.sent ? "#1f8a70" : "#202c33",- color: "#e9edef"- }}>- {msg.text}- </div>- </div>- ))}-</div>-```--## Staggered Message Entrances--Messages should appear one by one with slide + fade animations.--**Incorrect (all messages appear at once):**--```tsx-{messages.map(msg => <Bubble text={msg.text} />)}-```--**Correct (staggered with delays):**--```tsx-const STAGGER_DELAY = 38;-const FADE_DURATION = 18;--{messages.map((msg, i) => {- const startFrame = i * STAGGER_DELAY;- const opacity = interpolate(frame - startFrame, [0, FADE_DURATION], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });- const slideX = interpolate(opacity, [0, 1], [msg.sent ? 40 : -40, 0]);-- return (- <div style={{ opacity, transform: `translateX(${slideX}px)` }}>- {msg.text}- </div>- );-})}-```--## Spring Bounce on Bubble Entrance--Add spring physics for organic bubble pop-in effect.--```tsx-const bounce = spring({- frame: frame - startFrame,- fps,- config: { damping: 12, stiffness: 170 }-});-const scaleValue = interpolate(bounce, [0, 1], [0.98, 1]);--<div style={{- transform: `translateX(${slideX}px) scale(${scaleValue})`,- transformOrigin: msg.sent ? "100% 100%" : "0% 100%"-}}>-```--## Dark Theme Colors (WhatsApp style)--```tsx-const COLOR_BACKGROUND = "#0b141a";-const COLOR_SENT = "#1f8a70"; // Green for sent-const COLOR_RECEIVED = "#202c33"; // Dark gray for received-const COLOR_TEXT = "#e9edef"; // Light text-```--## Light Theme Colors (iMessage style)--```tsx-const COLOR_BACKGROUND = "#ffffff";-const COLOR_SENT = "#007AFF"; // Blue for sent-const COLOR_RECEIVED = "#E9E9EB"; // Light gray for received-const COLOR_TEXT_SENT = "#ffffff";-const COLOR_TEXT_RECEIVED = "#000000";-```--## Complete Examples--For full working code examples, see:-- [Chat Messages Example](../example-chat-messages/SKILL.md) - WhatsApp-style bouncy message bubblesdiff --git a/packages/skills/skills/sequencing/SKILL.md b/packages/skills/skills/sequencing/SKILL.mdindex 6642ede6af..dd4319dc42 100644--- a/packages/skills/skills/sequencing/SKILL.md+++ b/packages/skills/skills/sequencing/SKILL.md@@ -13,8 +13,12 @@ Use Sequence to delay when an element appears in the timeline.**Incorrect (manual frame checks):**```tsx-{frame >= 30 && <Title />}-{frame >= 60 && <Subtitle />}+{+ frame >= 30 && <Title />;+}+{+ frame >= 60 && <Subtitle />;+}```**Correct (Sequence component):**@@ -35,7 +39,7 @@ import { Sequence } from "remotion";Use Series when elements should play one after another without overlap.```tsx-import { Series } from "remotion";+import {Series} from 'remotion';<Series><Series.Sequence durationInFrames={45}>@@ -47,7 +51,7 @@ import { Series } from "remotion";<Series.Sequence durationInFrames={30}><Outro /></Series.Sequence>-</Series>+</Series>;```## Series with Offset for Overlap@@ -90,9 +94,9 @@ const items = data.map((item, i) => {const progress = spring({frame: frame - delay,fps,- config: { damping: 15, stiffness: 120 }+ config: {damping: 15, stiffness: 120},});- return <Item key={i} style={{ opacity: progress, transform: `translateY(${(1 - progress) * 20}px)` }} />;+ return <Item key={i} style={{opacity: progress, transform: `translateY(${(1 - progress) * 20}px)`}} />;});```@@ -124,6 +128,3 @@ Inside a Sequence, useCurrentFrame() returns the local frame (starting from 0):```## Complete Examples--For full working code examples, see:-- [Staggered List Example](../example-staggered-list/SKILL.md) - Feature list with staggered spring entrancesdiff --git a/packages/skills/skills/social-media/SKILL.md b/packages/skills/skills/social-media/SKILL.mddeleted file mode 100644index 67999a266a..0000000000--- a/packages/skills/skills/social-media/SKILL.md+++ /dev/null@@ -1,102 +0,0 @@-----name: social-media-description: Social media content optimization patterns for Remotion. Use when creating Instagram stories, TikTok content, YouTube shorts, reels, or vertical video content.-metadata:- impact: MEDIUM- tags: social, instagram, tiktok, reels, stories, mobile------## Safe Zone for UI Overlays--Keep key content in the center 80% to avoid platform UI elements.--**Incorrect (content at edges - gets covered by UI):**--```tsx-<AbsoluteFill style={{ padding: 10 }}>- <div style={{ position: "absolute", top: 0 }}>Title</div>- <div style={{ position: "absolute", bottom: 0 }}>CTA</div>-</AbsoluteFill>-```--**Correct (content in safe zone):**--```tsx-const SAFE_MARGIN_TOP = height * 0.12;-const SAFE_MARGIN_BOTTOM = height * 0.15;-const SAFE_MARGIN_SIDES = width * 0.05;--<AbsoluteFill style={{- paddingTop: SAFE_MARGIN_TOP,- paddingBottom: SAFE_MARGIN_BOTTOM,- paddingLeft: SAFE_MARGIN_SIDES,- paddingRight: SAFE_MARGIN_SIDES-}}>- {content}-</AbsoluteFill>-```--## Mobile-First Text Sizing--Text must be readable on small screens. Minimum 48px for headlines.--**Incorrect (text too small for mobile):**--```tsx-const TITLE_SIZE = 24;-const BODY_SIZE = 14;-```--**Correct (mobile-readable sizes):**--```tsx-const TITLE_SIZE = Math.max(48, Math.round(width * 0.08));-const BODY_SIZE = Math.max(28, Math.round(width * 0.045));-```--## Hook in First Frames--Social content needs immediate visual interest. Add movement from frame 0.--**Incorrect (static start):**--```tsx-const entrance = spring({ frame: frame - 30, fps }); // Starts after 1 second-```--**Correct (immediate hook):**--```tsx-const entrance = spring({ frame, fps, config: { damping: 12, stiffness: 200 } });-const pulse = Math.sin(frame * 0.15) * 0.03 + 1; // Subtle constant motion--<div style={{ transform: `scale(${entrance * pulse})` }}>- {content}-</div>-```--## High Contrast Colors--Use bold, saturated colors that pop on mobile screens.--```tsx-// Good for social-const COLOR_PRIMARY = "#FF3366";-const COLOR_ACCENT = "#00D4FF";-const COLOR_BG = "#0A0A0A";--// Avoid muted/pastel colors that look washed out-// const COLOR_PRIMARY = "#C4A4A4"; // Too muted-```--## Loop-Friendly Endings--Design animations that can seamlessly loop.--```tsx-const TOTAL_DURATION = durationInFrames;-const loopProgress = (frame % TOTAL_DURATION) / TOTAL_DURATION;--// Or fade to start state at the end-const fadeOut = interpolate(frame, [TOTAL_DURATION - 15, TOTAL_DURATION], [1, 0]);-```diff --git a/packages/skills/skills/text-animations/SKILL.md b/packages/skills/skills/text-animations/SKILL.mdindex 1a9fe4e566..bc3d4b5b36 100644--- a/packages/skills/skills/text-animations/SKILL.md+++ b/packages/skills/skills/text-animations/SKILL.md@@ -98,6 +98,7 @@ const finalOpacity = interpolate(frame, [highlightStart, highlightStart + 8], [0For full working code examples, see:-- [Typewriter with Highlight](assets/typewriter-highlight.tsx) - Typewriter effect with cursor blink, pause, and word highlight+- [Typewriter](assets/typewriter.tsx) - Typewriter effect with blinking cursor and dramatic pause+- [Word Highlight](assets/word-highlight.tsx) - Spring-animated highlight wipe on a word in a sentence- [Word Carousel](assets/word-carousel.tsx) - Rotating words with crossfade and blur- [Text Rotation](assets/text-rotation.tsx) - Rotating words with dissolve and blur effectsdiff --git a/packages/skills/skills/text-animations/assets/typewriter-highlight.tsx b/packages/skills/skills/text-animations/assets/typewriter-highlight.tsxdeleted file mode 100644index 6e736e90bc..0000000000--- a/packages/skills/skills/text-animations/assets/typewriter-highlight.tsx+++ /dev/null@@ -1,179 +0,0 @@-import {- useCurrentFrame,- useVideoConfig,- AbsoluteFill,- interpolate,- spring,-} from "remotion";--export const MyAnimation = () => {- /*- * Typewriter with blinking cursor, dramatic pause, spring-based highlight, and layer crossfade.- */- const frame = useCurrentFrame();- const { fps } = useVideoConfig();-- const COLOR_BG = "#ffffff";- const COLOR_TEXT = "#000000";- const COLOR_HIGHLIGHT = "#A7C7E7";-- const FULL_TEXT = "From prompt to motion graphics. This is Remotion.";- const HIGHLIGHT_WORD = "Remotion";- const CARET_SYMBOL = "\u258C";- const SPLIT_AFTER = " This is Remotion.";-- const FONT_SIZE = 72;- const FONT_WEIGHT = 700;- const CHAR_FRAMES = 2;- const CURSOR_BLINK_FRAMES = 16;- const HIGHLIGHT_DELAY = 6;- const HIGHLIGHT_WIPE_DURATION = 18;- const CROSSFADE_DURATION = 8;- const WAIT_AFTER_PRE_SECONDS = 1;-- const WAIT_AFTER_PRE_FRAMES = Math.round(fps * WAIT_AFTER_PRE_SECONDS);- const f = frame;-- const splitIndex = FULL_TEXT.indexOf(SPLIT_AFTER);- const preLen = splitIndex >= 0 ? splitIndex : FULL_TEXT.length;- const postLen = FULL_TEXT.length - preLen;-- let typedChars = 0;- if (f < preLen * CHAR_FRAMES) {- typedChars = Math.floor(f / CHAR_FRAMES);- } else if (f < preLen * CHAR_FRAMES + WAIT_AFTER_PRE_FRAMES) {- typedChars = preLen;- } else {- const postPhase = f - preLen * CHAR_FRAMES - WAIT_AFTER_PRE_FRAMES;- typedChars = Math.min(- FULL_TEXT.length,- preLen + Math.floor(postPhase / CHAR_FRAMES),- );- }- const typedText = FULL_TEXT.slice(0, typedChars);- const typingDone = typedChars >= FULL_TEXT.length;-- const caretOpacity = !typingDone- ? interpolate(- f % CURSOR_BLINK_FRAMES,- [0, CURSOR_BLINK_FRAMES / 2, CURSOR_BLINK_FRAMES],- [1, 0, 1],- { extrapolateLeft: "clamp", extrapolateRight: "clamp" },- )- : 0;-- const highlightIndex = FULL_TEXT.indexOf(HIGHLIGHT_WORD);- const hasHighlight = highlightIndex >= 0;- const preText = hasHighlight ? FULL_TEXT.slice(0, highlightIndex) : FULL_TEXT;- const postText = hasHighlight- ? FULL_TEXT.slice(highlightIndex + HIGHLIGHT_WORD.length)- : "";-- const typeEnd =- preLen * CHAR_FRAMES + WAIT_AFTER_PRE_FRAMES + postLen * CHAR_FRAMES;- const highlightStart = typeEnd + HIGHLIGHT_DELAY;-- const typedOpacity = interpolate(- f,- [highlightStart - CROSSFADE_DURATION, highlightStart + CROSSFADE_DURATION],- [1, 0],- { extrapolateLeft: "clamp", extrapolateRight: "clamp" },- );- const finalOpacity = interpolate(- f,- [highlightStart, highlightStart + CROSSFADE_DURATION],- [0, 1],- { extrapolateLeft: "clamp", extrapolateRight: "clamp" },- );-- const entrance = spring({- fps,- frame: f,- config: { damping: 200, stiffness: 120 },- durationInFrames: 20,- });- const containerScale = interpolate(entrance, [0, 1], [0.98, 1], {- extrapolateLeft: "clamp",- extrapolateRight: "clamp",- });-- const highlightProgress = spring({- fps,- frame: f - highlightStart,- config: { damping: 200, stiffness: 180 },- durationInFrames: HIGHLIGHT_WIPE_DURATION,- });- const highlightScaleX = Math.max(0, Math.min(1, highlightProgress));-- return (- <AbsoluteFill- style={{- backgroundColor: COLOR_BG,- display: "flex",- alignItems: "center",- justifyContent: "center",- fontFamily: "Inter, sans-serif",- }}- >- <div- style={{ position: "relative", transform: `scale(${containerScale})` }}- >- {/* Typing layer */}- <div- style={{- color: COLOR_TEXT,- fontSize: FONT_SIZE,- fontWeight: FONT_WEIGHT,- lineHeight: 1.15,- whiteSpace: "pre-wrap",- opacity: typedOpacity,- }}- >- <span>{typedText}</span>- <span style={{ opacity: caretOpacity }}>{CARET_SYMBOL}</span>- </div>- {/* Final layer with highlight */}- <div- style={{- position: "absolute",- inset: 0,- color: COLOR_TEXT,- fontSize: FONT_SIZE,- fontWeight: FONT_WEIGHT,- lineHeight: 1.15,- whiteSpace: "pre-wrap",- opacity: finalOpacity,- }}- >- {hasHighlight ? (- <>- <span>{preText}</span>- <span style={{ position: "relative", display: "inline-block" }}>- <span- style={{- position: "absolute",- left: 0,- right: 0,- top: "50%",- height: "1.05em",- transform: `translateY(-50%) scaleX(${highlightScaleX})`,- transformOrigin: "left center",- backgroundColor: COLOR_HIGHLIGHT,- borderRadius: "0.18em",- zIndex: 0,- }}- />- <span style={{ position: "relative", zIndex: 1 }}>- {HIGHLIGHT_WORD}- </span>- </span>- <span>{postText}</span>- </>- ) : (- <span>{FULL_TEXT}</span>- )}- </div>- </div>- </AbsoluteFill>- );-};diff --git a/packages/skills/skills/text-animations/assets/typewriter.tsx b/packages/skills/skills/text-animations/assets/typewriter.tsxnew file mode 100644index 0000000000..b09a82c259--- /dev/null+++ b/packages/skills/skills/text-animations/assets/typewriter.tsx@@ -0,0 +1,79 @@+import {+ useCurrentFrame,+ useVideoConfig,+ AbsoluteFill,+ interpolate,+} from "remotion";++export const MyAnimation = () => {+ /*+ * Typewriter effect with blinking cursor and optional dramatic pause.+ */+ const frame = useCurrentFrame();+ const { fps } = useVideoConfig();++ const COLOR_BG = "#ffffff";+ const COLOR_TEXT = "#000000";++ const FULL_TEXT = "From prompt to motion graphics. This is Remotion.";+ const CARET_SYMBOL = "\u258C";+ const PAUSE_AFTER = "From prompt to motion graphics.";++ const FONT_SIZE = 72;+ const FONT_WEIGHT = 700;+ const CHAR_FRAMES = 2;+ const CURSOR_BLINK_FRAMES = 16;+ const PAUSE_SECONDS = 1;++ const PAUSE_FRAMES = Math.round(fps * PAUSE_SECONDS);++ const pauseIndex = FULL_TEXT.indexOf(PAUSE_AFTER);+ const preLen = pauseIndex >= 0 ? pauseIndex + PAUSE_AFTER.length : FULL_TEXT.length;+ const postLen = FULL_TEXT.length - preLen;++ let typedChars = 0;+ if (frame < preLen * CHAR_FRAMES) {+ typedChars = Math.floor(frame / CHAR_FRAMES);+ } else if (frame < preLen * CHAR_FRAMES + PAUSE_FRAMES) {+ typedChars = preLen;+ } else {+ const postPhase = frame - preLen * CHAR_FRAMES - PAUSE_FRAMES;+ typedChars = Math.min(+ FULL_TEXT.length,+ preLen + Math.floor(postPhase / CHAR_FRAMES),+ );+ }+ const typedText = FULL_TEXT.slice(0, typedChars);++ const caretOpacity = interpolate(+ frame % CURSOR_BLINK_FRAMES,+ [0, CURSOR_BLINK_FRAMES / 2, CURSOR_BLINK_FRAMES],+ [1, 0, 1],+ { extrapolateLeft: "clamp", extrapolateRight: "clamp" },+ );++ return (+ <AbsoluteFill+ style={{+ backgroundColor: COLOR_BG,+ display: "flex",+ alignItems: "center",+ justifyContent: "center",+ fontFamily: "Inter, sans-serif",+ }}+ >+ <div+ style={{+ color: COLOR_TEXT,+ fontSize: FONT_SIZE,+ fontWeight: FONT_WEIGHT,+ lineHeight: 1.15,+ whiteSpace: "pre-wrap",+ }}+ >+ <span>{typedText}</span>+ <span style={{ opacity: caretOpacity }}>{CARET_SYMBOL}</span>+ </div>+ </AbsoluteFill>+ );+};diff --git a/packages/skills/skills/text-animations/assets/word-highlight.tsx b/packages/skills/skills/text-animations/assets/word-highlight.tsxnew file mode 100644index 0000000000..c6d63e1d40--- /dev/null+++ b/packages/skills/skills/text-animations/assets/word-highlight.tsx@@ -0,0 +1,91 @@+import {+ useCurrentFrame,+ useVideoConfig,+ AbsoluteFill,+ spring,+} from "remotion";++export const MyAnimation = () => {+ /*+ * Highlight a word in a sentence with a spring-animated wipe effect.+ */+ const frame = useCurrentFrame();+ const { fps } = useVideoConfig();++ const COLOR_BG = "#ffffff";+ const COLOR_TEXT = "#000000";+ const COLOR_HIGHLIGHT = "#A7C7E7";++ const FULL_TEXT = "From prompt to motion graphics. This is Remotion.";+ const HIGHLIGHT_WORD = "Remotion";++ const FONT_SIZE = 72;+ const FONT_WEIGHT = 700;+ const HIGHLIGHT_START_FRAME = 30;+ const HIGHLIGHT_WIPE_DURATION = 18;++ const highlightIndex = FULL_TEXT.indexOf(HIGHLIGHT_WORD);+ const hasHighlight = highlightIndex >= 0;+ const preText = hasHighlight ? FULL_TEXT.slice(0, highlightIndex) : FULL_TEXT;+ const postText = hasHighlight+ ? FULL_TEXT.slice(highlightIndex + HIGHLIGHT_WORD.length)+ : "";++ const highlightProgress = spring({+ fps,+ frame: frame - HIGHLIGHT_START_FRAME,+ config: { damping: 200, stiffness: 180 },+ durationInFrames: HIGHLIGHT_WIPE_DURATION,+ });+ const highlightScaleX = Math.max(0, Math.min(1, highlightProgress));++ return (+ <AbsoluteFill+ style={{+ backgroundColor: COLOR_BG,+ display: "flex",+ alignItems: "center",+ justifyContent: "center",+ fontFamily: "Inter, sans-serif",+ }}+ >+ <div+ style={{+ color: COLOR_TEXT,+ fontSize: FONT_SIZE,+ fontWeight: FONT_WEIGHT,+ lineHeight: 1.15,+ whiteSpace: "pre-wrap",+ }}+ >+ {hasHighlight ? (+ <>+ <span>{preText}</span>+ <span style={{ position: "relative", display: "inline-block" }}>+ <span+ style={{+ position: "absolute",+ left: 0,+ right: 0,+ top: "50%",+ height: "1.05em",+ transform: `translateY(-50%) scaleX(${highlightScaleX})`,+ transformOrigin: "left center",+ backgroundColor: COLOR_HIGHLIGHT,+ borderRadius: "0.18em",+ zIndex: 0,+ }}+ />+ <span style={{ position: "relative", zIndex: 1 }}>+ {HIGHLIGHT_WORD}+ </span>+ </span>+ <span>{postText}</span>+ </>+ ) : (+ <span>{FULL_TEXT}</span>+ )}+ </div>+ </AbsoluteFill>+ );+};diff --git a/packages/skills/src/Root.tsx b/packages/skills/src/Root.tsxindex df491e3700..a6e5d4698a 100644--- a/packages/skills/src/Root.tsx+++ b/packages/skills/src/Root.tsx@@ -1,18 +1,17 @@import {Composition} from 'remotion';+import {MyAnimation as FallingSpheresAnimation} from '../skills/3d/assets/falling-spheres';import {COMPOSITION_HEIGHT,COMPOSITION_WIDTH,MyAnimation,} from '../skills/charts/assets/animated-shapes';import {MyAnimation as BarChartAnimation} from '../skills/charts/assets/bar-chart';-import {MyAnimation as ChatMessagesAnimation} from '../skills/example-chat-messages/assets/example';import {MyAnimation as CounterAnimation} from '../skills/example-counter/assets/example';-import {MyAnimation as FallingSpheresAnimation} from '../skills/3d/assets/falling-spheres';-import {MyAnimation as StaggeredListAnimation} from '../skills/example-staggered-list/assets/example';+import {MyAnimation as LottieAnimation} from '../skills/lottie/assets/example';import {MyAnimation as TextRotationAnimation} from '../skills/text-animations/assets/text-rotation';-import {MyAnimation as TypewriterHighlightAnimation} from '../skills/text-animations/assets/typewriter-highlight';+import {MyAnimation as TypewriterAnimation} from '../skills/text-animations/assets/typewriter';import {MyAnimation as WordCarouselAnimation} from '../skills/text-animations/assets/word-carousel';-import {MyAnimation as LottieAnimation} from '../skills/lottie/assets/example';+import {MyAnimation as WordHighlightAnimation} from '../skills/text-animations/assets/word-highlight';export const RemotionRoot = () => {return (@@ -49,14 +48,6 @@ export const RemotionRoot = () => {width={1080}height={1080}/>- <Composition- id="ChatMessages"- component={ChatMessagesAnimation}- durationInFrames={180}- fps={30}- width={1080}- height={1080}- /><Compositionid="FallingSpheres"component={FallingSpheresAnimation}@@ -74,25 +65,25 @@ export const RemotionRoot = () => {height={720}/><Composition- id="TypewriterHighlight"- component={TypewriterHighlightAnimation}+ id="Typewriter"+ component={TypewriterAnimation}durationInFrames={180}fps={30}width={1080}height={1080}/><Composition- id="WordCarousel"- component={WordCarouselAnimation}- durationInFrames={200}+ id="WordHighlight"+ component={WordHighlightAnimation}+ durationInFrames={90}fps={30}width={1080}height={1080}/><Composition- id="StaggeredList"- component={StaggeredListAnimation}- durationInFrames={120}+ id="WordCarousel"+ component={WordCarouselAnimation}+ durationInFrames={200}fps={30}width={1080}height={1080}diff --git a/packages/template-prompt-to-motion-graphics/src/examples/code/index.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/index.tsindex 7705ca9ec3..713b31f0d5 100644--- a/packages/template-prompt-to-motion-graphics/src/examples/code/index.ts+++ b/packages/template-prompt-to-motion-graphics/src/examples/code/index.ts@@ -9,7 +9,6 @@ import { fallingSpheresExample } from "./falling-spheres";import { goldPriceChartExample } from "./gold-price-chart";import { typewriterHighlightExample } from "./typewriter-highlight";import { wordCarouselExample } from "./word-carousel";-import { staggeredListExample } from "./staggered-list";export interface RemotionExample {id: string;@@ -33,7 +32,6 @@ export const examples: RemotionExample[] = [goldPriceChartExample,typewriterHighlightExample,wordCarouselExample,- staggeredListExample,];export function getExampleById(id: string): RemotionExample | undefined {diff --git a/packages/template-prompt-to-motion-graphics/src/examples/code/staggered-list.ts b/packages/template-prompt-to-motion-graphics/src/examples/code/staggered-list.tsdeleted file mode 100644index 300c5e1b33..0000000000--- a/packages/template-prompt-to-motion-graphics/src/examples/code/staggered-list.ts+++ /dev/null@@ -1,123 +0,0 @@-import { RemotionExample } from "./index";--export const staggeredListCode = `import { useCurrentFrame, useVideoConfig, AbsoluteFill, interpolate, spring } from "remotion";--export const MyAnimation = () => {- /*- * Feature list with staggered spring entrances and subtle hover-like highlights.- */- const frame = useCurrentFrame();- const { fps } = useVideoConfig();-- const COLOR_BG = "#0f0f0f";- const COLOR_TEXT = "#ffffff";- const COLOR_ACCENT = "#6366f1";- const COLOR_MUTED = "#a1a1aa";-- const TITLE = "Why Choose Us";- const FEATURES = [- { icon: "\u26A1", title: "Lightning Fast", desc: "Built for speed from the ground up" },- { icon: "\uD83D\uDD12", title: "Secure by Default", desc: "Enterprise-grade security included" },- { icon: "\uD83C\uDFA8", title: "Beautiful Design", desc: "Crafted with attention to detail" },- { icon: "\uD83D\uDE80", title: "Scale Infinitely", desc: "Grows with your business needs" },- ];-- const TITLE_FONT_SIZE = 48;- const ITEM_FONT_SIZE = 28;- const DESC_FONT_SIZE = 18;- const ICON_SIZE = 48;- const ITEM_GAP = 24;- const PADDING = 60;-- const TITLE_START = 0;- const ITEMS_START = 20;- const STAGGER_DELAY = 12;- const SLIDE_DISTANCE = 30;-- const titleProgress = spring({- frame: frame - TITLE_START,- fps,- config: { damping: 20, stiffness: 100 }- });-- return (- <AbsoluteFill style={{- backgroundColor: COLOR_BG,- padding: PADDING,- display: "flex",- flexDirection: "column",- justifyContent: "center",- fontFamily: "Inter, sans-serif"- }}>- {/* Title */}- <div style={{- fontSize: TITLE_FONT_SIZE,- fontWeight: 700,- color: COLOR_TEXT,- marginBottom: 40,- opacity: titleProgress,- transform: \`translateY(\${(1 - titleProgress) * 20}px)\`- }}>- {TITLE}- </div>-- {/* Feature list */}- <div style={{ display: "flex", flexDirection: "column", gap: ITEM_GAP }}>- {FEATURES.map((feature, i) => {- const itemStart = ITEMS_START + i * STAGGER_DELAY;- const itemProgress = spring({- frame: frame - itemStart,- fps,- config: { damping: 15, stiffness: 120 }- });- const opacity = interpolate(itemProgress, [0, 1], [0, 1], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });- const translateX = interpolate(itemProgress, [0, 1], [SLIDE_DISTANCE, 0], { extrapolateLeft: "clamp", extrapolateRight: "clamp" });-- return (- <div- key={i}- style={{- display: "flex",- alignItems: "center",- gap: 20,- opacity,- transform: \`translateX(\${translateX}px)\`- }}- >- <div style={{- width: ICON_SIZE,- height: ICON_SIZE,- borderRadius: 12,- backgroundColor: COLOR_ACCENT + "20",- display: "flex",- alignItems: "center",- justifyContent: "center",- fontSize: 24- }}>- {feature.icon}- </div>- <div>- <div style={{ fontSize: ITEM_FONT_SIZE, fontWeight: 600, color: COLOR_TEXT }}>- {feature.title}- </div>- <div style={{ fontSize: DESC_FONT_SIZE, color: COLOR_MUTED, marginTop: 4 }}>- {feature.desc}- </div>- </div>- </div>- );- })}- </div>- </AbsoluteFill>- );-};`;--export const staggeredListExample: RemotionExample = {- id: "staggered-list",- name: "Staggered Feature List",- description: "Feature list with staggered spring entrances and slide animations",- category: "Other",- durationInFrames: 120,- fps: 30,- code: staggeredListCode,-};diff --git a/packages/template-prompt-to-motion-graphics/src/skills/index.ts b/packages/template-prompt-to-motion-graphics/src/skills/index.tsindex a44cd4a558..325197b871 100644--- a/packages/template-prompt-to-motion-graphics/src/skills/index.ts+++ b/packages/template-prompt-to-motion-graphics/src/skills/index.ts@@ -36,7 +36,6 @@ const EXAMPLE_SKILLS = ["example-gold-price-chart","example-typewriter-highlight","example-word-carousel",- "example-staggered-list",] as const;export const SKILL_NAMES = [...GUIDANCE_SKILLS, ...EXAMPLE_SKILLS] as const;@@ -69,13 +68,13 @@ const exampleIdMap: Record<(typeof EXAMPLE_SKILLS)[number], string> = {"example-gold-price-chart": "gold-price-chart","example-typewriter-highlight": "typewriter-highlight","example-word-carousel": "word-carousel",- "example-staggered-list": "staggered-list",};export function getSkillContent(skillName: SkillName): string {// Handle example skills - return the code directlyif (skillName.startsWith("example-")) {- const exampleId = exampleIdMap[skillName as (typeof EXAMPLE_SKILLS)[number]];+ const exampleId =+ exampleIdMap[skillName as (typeof EXAMPLE_SKILLS)[number]];const example = examples.find((e) => e.id === exampleId);if (example) {return `## Example: ${example.name}\n${example.description}\n\n\`\`\`tsx\n${example.code}\n\`\`\``;@@ -84,7 +83,9 @@ export function getSkillContent(skillName: SkillName): string {}// Handle guidance skills - return imported markdown content- return guidanceSkillContent[skillName as (typeof GUIDANCE_SKILLS)[number]] || "";+ return (+ guidanceSkillContent[skillName as (typeof GUIDANCE_SKILLS)[number]] || ""+ );}export function getCombinedSkillContent(skills: SkillName[]): string {@@ -125,6 +126,5 @@ Code examples (complete working references):- example-gold-price-chart: bar chart with Y-axis labels, monthly data, staggered animations- example-typewriter-highlight: typewriter effect with cursor blink, pause, and word highlight- example-word-carousel: rotating words with crossfade and blur transitions-- example-staggered-list: feature list with staggered spring entrancesReturn an array of matching category names. Return an empty array if none apply.`;