Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

fix: typography jitter

kapishdima5cfe3032282d
diff --git a/components/docs/examples/drift-example.tsx b/components/docs/examples/drift-example.tsx
index 59de0197..0c2d1840 100644
--- a/components/docs/examples/drift-example.tsx
+++ b/components/docs/examples/drift-example.tsx
@@ -43,44 +43,46 @@ function ReportCard() {
maxWidth: 720,
}}
>
- <div
- style={{
- fontFamily: FONT_FAMILY,
- fontSize: 56,
- fontWeight: 600,
- color: "#f2f2f2",
- }}
- >
- Quarterly Report
- </div>
- <div
- style={{
- fontFamily: FONT_FAMILY,
- fontSize: 24,
- color: "#8a8794",
- marginTop: 16,
- }}
- >
- Revenue grew across every region this quarter.
- </div>
- <div
- style={{
- fontFamily: FONT_FAMILY,
- fontSize: 24,
- color: "#8a8794",
- }}
- >
- Customer retention held steady above target.
- </div>
- <div
- style={{
- display: "flex",
- gap: 40,
- marginTop: 32,
- }}
- >
- <Stat value="+18%" label="Revenue" />
- <Stat value="94%" label="Retention" />
+ <div style={{ willChange: "transform" }}>
+ <div
+ style={{
+ fontFamily: FONT_FAMILY,
+ fontSize: 56,
+ fontWeight: 600,
+ color: "#f2f2f2",
+ }}
+ >
+ Quarterly Report
+ </div>
+ <div
+ style={{
+ fontFamily: FONT_FAMILY,
+ fontSize: 24,
+ color: "#8a8794",
+ marginTop: 16,
+ }}
+ >
+ Revenue grew across every region this quarter.
+ </div>
+ <div
+ style={{
+ fontFamily: FONT_FAMILY,
+ fontSize: 24,
+ color: "#8a8794",
+ }}
+ >
+ Customer retention held steady above target.
+ </div>
+ <div
+ style={{
+ display: "flex",
+ gap: 40,
+ marginTop: 32,
+ }}
+ >
+ <Stat value="+18%" label="Revenue" />
+ <Stat value="94%" label="Retention" />
+ </div>
</div>
</div>
);
diff --git a/content/changelog/2026-07-21-text-jitter-fix.mdx b/content/changelog/2026-07-21-text-jitter-fix.mdx
new file mode 100644
index 00000000..f6764006
--- /dev/null
+++ b/content/changelog/2026-07-21-text-jitter-fix.mdx
@@ -0,0 +1,17 @@
+---
+title: Text animations no longer jitter on the landing
+date: 2026-07-21
+---
+
+A caption easing into place did not glide — it held still, clicked down a pixel, held still, clicked again. Give every word or character its own stagger and those clicks land on different frames, so a ripple ran through the line while the rule right next to it stayed perfectly smooth.
+
+That contrast is what made it visible, and it is not a Remotion bug. A glyph is rasterized into a cache that can only be placed on a whole device pixel vertically. Once an eased tail slows below roughly half a pixel per frame, nothing moves for several frames — then the accumulated offset crosses a boundary and the glyph jumps a whole pixel at once. Rectangles and borders have no such cache, so they shade their edge pixel instead and glide.
+
+The fix splits the progress driver in two. Position now lands on a short window while opacity, blur, and colour keep the full curve — the part removed is the part the eye never read as movement, only as clicking. Entrances look the same; the ripple is gone.
+
+### Fixes
+
+- Travel windows clipped on [Soft Blur In](/docs/typography/soft-blur-in), [Per Character Rise](/docs/typography/per-character-rise), [Line By Line Slide](/docs/typography/line-by-line-slide), [Mask Reveal Up](/docs/typography/mask-reveal-up), [Bottom Up Letters](/docs/typography/bottom-up-letters), [Top Down Letters](/docs/typography/top-down-letters), [Short Slide Right](/docs/typography/short-slide-right), [Short Slide Down](/docs/typography/short-slide-down), and [Kinetic Center Build](/docs/typography/kinetic-center-build).
+- Ease-in exits had the mirrored problem, with the creep at the start instead of the end. [Per Word Crossfade](/docs/typography/per-word-crossfade), [Blur Out Up](/docs/typography/blur-out-up), [Mask Reveal Up](/docs/typography/mask-reveal-up), and [Line By Line Slide](/docs/typography/line-by-line-slide) now delay the travel rather than clip it.
+- [Short Slide Down](/docs/typography/short-slide-down) and [Kinetic Center Build](/docs/typography/kinetic-center-build) also reflow their earlier words every time a new one lands. Those pushes are the dominant motion in both components and had the same eased tail, so they are clipped to the same window as the entrance.
+- [Staggered Fade Up](/docs/typography/staggered-fade-up) was already clean and is untouched. It is linear, so it never enters the sub-pixel zone — the proof of the rule rather than an exception to it.
diff --git a/content/docs/layout/drift.mdx b/content/docs/layout/drift.mdx
index 52d5c656..33e55892 100644
--- a/content/docs/layout/drift.mdx
+++ b/content/docs/layout/drift.mdx
@@ -54,6 +54,23 @@ export const MyVideo = () => (
);
```
+## Text under drift
+
+A slow push-in keeps every glyph in sub-pixel motion, and a glyph raster can only sit on a whole device pixel — so type inside a plain `Drift` trembles while borders right next to it glide. Give text blocks their own compositor layer, and the zoom moves a cached texture instead of re-rasterizing the glyphs every frame:
+
+```tsx
+<Drift>
+ <div style={{ border: "1px solid rgba(255,255,255,0.08)" }}>
+ <div style={{ willChange: "transform" }}>
+ <h1>Quarterly Report</h1>
+ <p>Revenue grew across every region this quarter.</p>
+ </div>
+ </div>
+</Drift>
+```
+
+One layer per text container — never per word or character, and never on `Drift` itself. Keep borders and other hairline geometry outside the promoted layer: as part of a resampled texture, a 1px line pulses between sharp and blurry as the scale creeps, while fresh rasterization every frame lets it glide.
+
## Props
<PropsTable
diff --git a/registry-artifacts/blur-out-up.json b/registry-artifacts/blur-out-up.json
index 480a8ac3..3db0941b 100644
--- a/registry-artifacts/blur-out-up.json
+++ b/registry-artifacts/blur-out-up.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/remocn/blur-out-up/index.tsx",
- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface BlurOutUpProps {\n text: string;\n staggerDelay?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function BlurOutUp({\n text,\n staggerDelay = 1,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: BlurOutUpProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const words = text.split(\" \");\n\n const enterDur = 17;\n const exitDur = 14;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (words.length - 1) * staggerDelay;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (words.length - 1) * staggerDelay,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {words.map((word, i) => {\n const enterLocal = frame - i * staggerDelay;\n const exitLocal = frame - exitStart - i * staggerDelay;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(enterLocal, [0, enterDur], [10, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const yExit = interpolate(exitLocal, [0, exitDur], [0, -14], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const y = yEnter + yExit;\n\n const blurEnter = interpolate(enterLocal, [0, enterDur], [6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const blurExit = interpolate(exitLocal, [0, exitDur], [0, 8], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const blur = blurEnter + blurExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n filter: `blur(${blur}px)`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface BlurOutUpProps {\n text: string;\n staggerDelay?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function BlurOutUp({\n text,\n staggerDelay = 1,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: BlurOutUpProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const words = text.split(\" \");\n\n const enterDur = 17;\n const enterTravel = 6;\n const exitDur = 14;\n const exitTravelFrom = 8;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (words.length - 1) * staggerDelay;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (words.length - 1) * staggerDelay,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {words.map((word, i) => {\n const enterLocal = frame - i * staggerDelay;\n const exitLocal = frame - exitStart - i * staggerDelay;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(enterLocal, [0, enterTravel], [10, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const yExit = interpolate(\n exitLocal,\n [exitTravelFrom, exitDur],\n [0, -14],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const y = yEnter + yExit;\n\n const blurEnter = interpolate(enterLocal, [0, enterDur], [6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const blurExit = interpolate(exitLocal, [0, exitDur], [0, 8], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const blur = blurEnter + blurExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n filter: `blur(${blur}px)`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/blur-out-up.tsx"
}
diff --git a/registry-artifacts/bottom-up-letters.json b/registry-artifacts/bottom-up-letters.json
index d6e5d75b..2303f13c 100644
--- a/registry-artifacts/bottom-up-letters.json
+++ b/registry-artifacts/bottom-up-letters.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/remocn/bottom-up-letters/index.tsx",
- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface BottomUpLettersProps {\n text: string;\n staggerDelay?: number;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function BottomUpLetters({\n text,\n staggerDelay = 3,\n distance = 46,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: BottomUpLettersProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 12;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerDelay;\n const easing = Easing.bezier(0.18, 1, 0.32, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charDurationFrames], [distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface BottomUpLettersProps {\n text: string;\n staggerDelay?: number;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function BottomUpLetters({\n text,\n staggerDelay = 3,\n distance = 46,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: BottomUpLettersProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 12;\n const charTravelFrames = 7;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerDelay;\n const easing = Easing.bezier(0.18, 1, 0.32, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/bottom-up-letters.tsx"
}
diff --git a/registry-artifacts/kinetic-center-build.json b/registry-artifacts/kinetic-center-build.json
index 20a18f70..569e32bf 100644
--- a/registry-artifacts/kinetic-center-build.json
+++ b/registry-artifacts/kinetic-center-build.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/remocn/kinetic-center-build/index.tsx",
- "content": "\"use client\";\n\nimport { useMemo } from \"react\";\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface KineticCenterBuildProps {\n text: string;\n entryOffset?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nconst MEASURE_FONT =\n '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif';\n\nfunction measureWidths(\n words: string[],\n fontSize: number,\n fontWeight: number,\n): number[] {\n if (typeof document === \"undefined\") {\n return words.map((w) => w.length * fontSize * 0.55);\n }\n const ctx = document.createElement(\"canvas\").getContext(\"2d\");\n if (!ctx) return words.map((w) => w.length * fontSize * 0.55);\n ctx.font = `${fontWeight} ${fontSize}px ${MEASURE_FONT}`;\n return words.map((w) => ctx.measureText(w).width);\n}\n\nexport function KineticCenterBuild({\n text,\n entryOffset = 88,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: KineticCenterBuildProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = useMemo(() => text.split(\" \"), [text]);\n const widths = useMemo(\n () => measureWidths(words, fontSize, fontWeight),\n [words, fontSize, fontWeight],\n );\n\n const gap = 10;\n const firstDur = 10;\n const pushDur = 13;\n const entryScale = 0.992;\n const entryBlur = 3.5;\n const reflowBlur = 0.8;\n const firstWordY = 6;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n\n const positionsAt = useMemo(() => {\n const out: number[][] = [];\n for (let k = 1; k <= words.length; k++) {\n let total = gap * (k - 1);\n for (let j = 0; j < k; j++) total += widths[j];\n let cursor = -total / 2;\n const xs: number[] = [];\n for (let j = 0; j < k; j++) {\n xs.push(cursor + widths[j] / 2);\n cursor += widths[j] + gap;\n }\n out.push(xs);\n }\n return out;\n }, [words, widths]);\n\n const n = words.length;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <div\n className={className}\n style={{\n position: \"relative\",\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: FONT_FAMILY,\n whiteSpace: \"nowrap\",\n }}\n >\n {words.map((word, j) => {\n const entryStart = j === 0 ? 0 : firstDur + (j - 1) * pushDur;\n const entryEnd = entryStart + (j === 0 ? firstDur : pushDur);\n const targetX = positionsAt[j][j];\n const xFrom = j === 0 ? 0 : targetX + entryOffset;\n\n let x = targetX;\n let opacity = 1;\n let scale = 1;\n let blur = 0;\n let y = 0;\n\n if (frame < entryStart) {\n opacity = 0;\n x = xFrom;\n scale = entryScale;\n blur = entryBlur;\n y = j === 0 ? firstWordY : 0;\n } else if (frame <= entryEnd) {\n const range: [number, number] = [entryStart, entryEnd];\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n easing,\n };\n x = interpolate(frame, range, [xFrom, targetX], opts);\n opacity = interpolate(frame, range, [0, 1], opts);\n scale = interpolate(frame, range, [entryScale, 1], opts);\n blur = interpolate(frame, range, [entryBlur, 0], opts);\n y = j === 0 ? interpolate(frame, range, [firstWordY, 0], opts) : 0;\n } else {\n for (let w = j + 1; w < n; w++) {\n const pushStart = firstDur + (w - 1) * pushDur;\n const pushEnd = pushStart + pushDur;\n const fromX = positionsAt[w - 1][j];\n const toX = positionsAt[w][j];\n if (frame >= pushEnd) {\n x = toX;\n } else if (frame >= pushStart) {\n x = interpolate(frame, [pushStart, pushEnd], [fromX, toX], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n blur = interpolate(\n frame,\n [pushStart, (pushStart + pushEnd) / 2, pushEnd],\n [0, reflowBlur, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n break;\n } else {\n x = fromX;\n break;\n }\n }\n }\n\n return (\n <span\n key={j}\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n whiteSpace: \"nowrap\",\n backfaceVisibility: \"hidden\",\n transform: `translate(-50%, -50%) translate3d(${x}px, ${y}px, 0) scale(${scale})`,\n filter: `blur(${blur}px)`,\n opacity,\n }}\n >\n {word}\n </span>\n );\n })}\n </div>\n </div>\n );\n}\n",
+ "content": "\"use client\";\n\nimport { useMemo } from \"react\";\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface KineticCenterBuildProps {\n text: string;\n entryOffset?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nconst MEASURE_FONT =\n '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif';\n\nfunction measureWidths(\n words: string[],\n fontSize: number,\n fontWeight: number,\n): number[] {\n if (typeof document === \"undefined\") {\n return words.map((w) => w.length * fontSize * 0.55);\n }\n const ctx = document.createElement(\"canvas\").getContext(\"2d\");\n if (!ctx) return words.map((w) => w.length * fontSize * 0.55);\n ctx.font = `${fontWeight} ${fontSize}px ${MEASURE_FONT}`;\n return words.map((w) => ctx.measureText(w).width);\n}\n\nexport function KineticCenterBuild({\n text,\n entryOffset = 88,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: KineticCenterBuildProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = useMemo(() => text.split(\" \"), [text]);\n const widths = useMemo(\n () => measureWidths(words, fontSize, fontWeight),\n [words, fontSize, fontWeight],\n );\n\n const gap = 10;\n const firstDur = 10;\n const pushDur = 13;\n const travelDur = 7;\n const entryScale = 0.992;\n const entryBlur = 3.5;\n const reflowBlur = 0.8;\n const firstWordY = 6;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n\n const positionsAt = useMemo(() => {\n const out: number[][] = [];\n for (let k = 1; k <= words.length; k++) {\n let total = gap * (k - 1);\n for (let j = 0; j < k; j++) total += widths[j];\n let cursor = -total / 2;\n const xs: number[] = [];\n for (let j = 0; j < k; j++) {\n xs.push(cursor + widths[j] / 2);\n cursor += widths[j] + gap;\n }\n out.push(xs);\n }\n return out;\n }, [words, widths]);\n\n const n = words.length;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <div\n className={className}\n style={{\n position: \"relative\",\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: FONT_FAMILY,\n whiteSpace: \"nowrap\",\n }}\n >\n {words.map((word, j) => {\n const entryStart = j === 0 ? 0 : firstDur + (j - 1) * pushDur;\n const entryEnd = entryStart + (j === 0 ? firstDur : pushDur);\n const targetX = positionsAt[j][j];\n const xFrom = j === 0 ? 0 : targetX + entryOffset;\n\n let x = targetX;\n let opacity = 1;\n let scale = 1;\n let blur = 0;\n let y = 0;\n\n if (frame < entryStart) {\n opacity = 0;\n x = xFrom;\n scale = entryScale;\n blur = entryBlur;\n y = j === 0 ? firstWordY : 0;\n } else if (frame <= entryEnd) {\n const range: [number, number] = [entryStart, entryEnd];\n const travelRange: [number, number] = [\n entryStart,\n Math.min(entryStart + travelDur, entryEnd),\n ];\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n easing,\n };\n x = interpolate(frame, travelRange, [xFrom, targetX], opts);\n opacity = interpolate(frame, range, [0, 1], opts);\n scale = interpolate(frame, range, [entryScale, 1], opts);\n blur = interpolate(frame, range, [entryBlur, 0], opts);\n y =\n j === 0\n ? interpolate(frame, travelRange, [firstWordY, 0], opts)\n : 0;\n } else {\n for (let w = j + 1; w < n; w++) {\n const pushStart = firstDur + (w - 1) * pushDur;\n const pushEnd = pushStart + pushDur;\n const fromX = positionsAt[w - 1][j];\n const toX = positionsAt[w][j];\n if (frame >= pushEnd) {\n x = toX;\n } else if (frame >= pushStart) {\n x = interpolate(\n frame,\n [pushStart, Math.min(pushStart + travelDur, pushEnd)],\n [fromX, toX],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n },\n );\n blur = interpolate(\n frame,\n [pushStart, (pushStart + pushEnd) / 2, pushEnd],\n [0, reflowBlur, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n break;\n } else {\n x = fromX;\n break;\n }\n }\n }\n\n return (\n <span\n key={j}\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n whiteSpace: \"nowrap\",\n backfaceVisibility: \"hidden\",\n transform: `translate(-50%, -50%) translate3d(${x}px, ${y}px, 0) scale(${scale})`,\n filter: `blur(${blur}px)`,\n opacity,\n }}\n >\n {word}\n </span>\n );\n })}\n </div>\n </div>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/kinetic-center-build.tsx"
}
diff --git a/registry-artifacts/line-by-line-slide.json b/registry-artifacts/line-by-line-slide.json
index aff5c9e1..8be0859d 100644
--- a/registry-artifacts/line-by-line-slide.json
+++ b/registry-artifacts/line-by-line-slide.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/remocn/line-by-line-slide/index.tsx",
- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface LineByLineSlideProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function LineByLineSlide({\n text,\n distance = 48,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: LineByLineSlideProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const lines = text.split(\"\\n\");\n\n const enterDur = 27;\n const exitDur = 18;\n const enterStagger = 4;\n const exitStagger = 2;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (lines.length - 1) * enterStagger;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (lines.length - 1) * exitStagger,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n lineHeight: 1.1,\n textAlign: \"left\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {lines.map((line, i) => {\n const enterLocal = frame - i * enterStagger;\n const exitLocal = frame - exitStart - i * exitStagger;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const xEnter = interpolate(\n enterLocal,\n [0, enterDur],\n [-distance, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n },\n );\n\n const xExit = interpolate(exitLocal, [0, exitDur], [0, distance], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const x = xEnter + xExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"block\",\n transformOrigin: \"0% 50%\",\n opacity,\n transform: `translateX(${x}px)`,\n }}\n >\n {line}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface LineByLineSlideProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function LineByLineSlide({\n text,\n distance = 48,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: LineByLineSlideProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const lines = text.split(\"\\n\");\n\n const enterDur = 27;\n const enterTravel = 14;\n const exitDur = 18;\n const exitTravelFrom = 8;\n const enterStagger = 4;\n const exitStagger = 2;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (lines.length - 1) * enterStagger;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (lines.length - 1) * exitStagger,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n lineHeight: 1.1,\n textAlign: \"left\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {lines.map((line, i) => {\n const enterLocal = frame - i * enterStagger;\n const exitLocal = frame - exitStart - i * exitStagger;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const xEnter = interpolate(\n enterLocal,\n [0, enterTravel],\n [-distance, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n },\n );\n\n const xExit = interpolate(\n exitLocal,\n [exitTravelFrom, exitDur],\n [0, distance],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const x = xEnter + xExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"block\",\n transformOrigin: \"0% 50%\",\n opacity,\n transform: `translateX(${x}px)`,\n }}\n >\n {line}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/line-by-line-slide.tsx"
}
diff --git a/registry-artifacts/mask-reveal-up.json b/registry-artifacts/mask-reveal-up.json
index 8f7da0d0..e984ef1f 100644
--- a/registry-artifacts/mask-reveal-up.json
+++ b/registry-artifacts/mask-reveal-up.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/remocn/mask-reveal-up/index.tsx",
- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface MaskRevealUpProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function MaskRevealUp({\n text,\n distance = 30,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: MaskRevealUpProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const lines = text.split(\"\\n\");\n\n const enterDur = 23;\n const exitDur = 16;\n const enterStagger = 3;\n const exitStagger = 2;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (lines.length - 1) * enterStagger;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (lines.length - 1) * exitStagger,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n lineHeight: 1.1,\n textAlign: \"center\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {lines.map((line, i) => {\n const enterLocal = frame - i * enterStagger;\n const exitLocal = frame - exitStart - i * exitStagger;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(enterLocal, [0, enterDur], [distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const yExit = interpolate(exitLocal, [0, exitDur], [0, -22], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const y = yEnter + yExit;\n\n const blurEnter = interpolate(enterLocal, [0, enterDur], [6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const blurExit = interpolate(exitLocal, [0, exitDur], [0, 6], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const blur = blurEnter + blurExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"block\",\n transformOrigin: \"50% 50%\",\n opacity,\n transform: `translateY(${y}px)`,\n filter: `blur(${blur}px)`,\n }}\n >\n {line}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface MaskRevealUpProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function MaskRevealUp({\n text,\n distance = 30,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: MaskRevealUpProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const lines = text.split(\"\\n\");\n\n const enterDur = 23;\n const enterTravel = 11;\n const exitDur = 16;\n const exitTravelFrom = 8;\n const enterStagger = 3;\n const exitStagger = 2;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (lines.length - 1) * enterStagger;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (lines.length - 1) * exitStagger,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n lineHeight: 1.1,\n textAlign: \"center\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {lines.map((line, i) => {\n const enterLocal = frame - i * enterStagger;\n const exitLocal = frame - exitStart - i * exitStagger;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(\n enterLocal,\n [0, enterTravel],\n [distance, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n },\n );\n\n const yExit = interpolate(\n exitLocal,\n [exitTravelFrom, exitDur],\n [0, -22],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const y = yEnter + yExit;\n\n const blurEnter = interpolate(enterLocal, [0, enterDur], [6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const blurExit = interpolate(exitLocal, [0, exitDur], [0, 6], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const blur = blurEnter + blurExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"block\",\n transformOrigin: \"50% 50%\",\n opacity,\n transform: `translateY(${y}px)`,\n filter: `blur(${blur}px)`,\n }}\n >\n {line}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/mask-reveal-up.tsx"
}
diff --git a/registry-artifacts/per-character-rise.json b/registry-artifacts/per-character-rise.json
index d3623d25..cb5fc6e2 100644
--- a/registry-artifacts/per-character-rise.json
+++ b/registry-artifacts/per-character-rise.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/remocn/per-character-rise/index.tsx",
- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface PerCharacterRiseProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function PerCharacterRise({\n text,\n distance = 32,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: PerCharacterRiseProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 21;\n const staggerFrames = 1;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerFrames;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charDurationFrames], [distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface PerCharacterRiseProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function PerCharacterRise({\n text,\n distance = 32,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: PerCharacterRiseProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 21;\n const charTravelFrames = 10;\n const staggerFrames = 1;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerFrames;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n const travelEasing = Easing.bezier(0.2, 0.8, 0.6, 0.85);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: travelEasing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/per-character-rise.tsx"
}
diff --git a/registry-artifacts/per-word-crossfade.json b/registry-artifacts/per-word-crossfade.json
index c0723213..f84164d1 100644
--- a/registry-artifacts/per-word-crossfade.json
+++ b/registry-artifacts/per-word-crossfade.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/remocn/per-word-crossfade/index.tsx",
- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface PerWordCrossfadeProps {\n fromText: string;\n toText: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function PerWordCrossfade({\n fromText,\n toText,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: PerWordCrossfadeProps) {\n const frame = useCurrentFrame() * speed;\n\n const fromWords = fromText.split(\" \");\n const toWords = toText.split(\" \");\n\n const enterDur = 21;\n const exitDur = 15;\n const enterStagger = 2;\n const exitStagger = 1;\n const overlapF = 5;\n const microDelayF = 2;\n\n const enterEasing = Easing.bezier(0.16, 1, 0.3, 1);\n const exitEasing = Easing.bezier(0.7, 0, 0.84, 0);\n\n const exitTotal = exitDur + (fromWords.length - 1) * exitStagger;\n const newStart = Math.max(0, exitTotal - overlapF + microDelayF);\n\n const fontStack =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n }}\n >\n {fromWords.map((word, i) => {\n const local = frame - i * exitStagger;\n const opacity = interpolate(local, [0, exitDur], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n const y = interpolate(local, [0, exitDur], [0, -6], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n }}\n >\n {toWords.map((word, j) => {\n const local = frame - newStart - j * enterStagger;\n const opacity = interpolate(local, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const y = interpolate(local, [0, enterDur], [8, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n return (\n <span\n key={j}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n </div>\n );\n}\n",
+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface PerWordCrossfadeProps {\n fromText: string;\n toText: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function PerWordCrossfade({\n fromText,\n toText,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: PerWordCrossfadeProps) {\n const frame = useCurrentFrame() * speed;\n\n const fromWords = fromText.split(\" \");\n const toWords = toText.split(\" \");\n\n const enterDur = 21;\n const enterTravel = 5;\n const exitDur = 15;\n const exitTravelFrom = 6;\n const enterStagger = 2;\n const exitStagger = 1;\n const overlapF = 5;\n const microDelayF = 2;\n\n const enterEasing = Easing.bezier(0.16, 1, 0.3, 1);\n const exitEasing = Easing.bezier(0.7, 0, 0.84, 0);\n\n const exitTotal = exitDur + (fromWords.length - 1) * exitStagger;\n const newStart = Math.max(0, exitTotal - overlapF + microDelayF);\n\n const fontStack =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n }}\n >\n {fromWords.map((word, i) => {\n const local = frame - i * exitStagger;\n const opacity = interpolate(local, [0, exitDur], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n const y = interpolate(local, [exitTravelFrom, exitDur], [0, -6], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n }}\n >\n {toWords.map((word, j) => {\n const local = frame - newStart - j * enterStagger;\n const opacity = interpolate(local, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const y = interpolate(local, [0, enterTravel], [8, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n return (\n <span\n key={j}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n </div>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/per-word-crossfade.tsx"
}
diff --git a/registry-artifacts/short-slide-down.json b/registry-artifacts/short-slide-down.json
index 5da9ebdb..b2bb9cb3 100644
--- a/registry-artifacts/short-slide-down.json
+++ b/registry-artifacts/short-slide-down.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/remocn/short-slide-down/index.tsx",
- "content": "\"use client\";\n\nimport { useMemo } from \"react\";\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface ShortSlideDownProps {\n text: string;\n entryOffset?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nexport function ShortSlideDown({\n text,\n entryOffset = 28,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: ShortSlideDownProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = useMemo(() => text.split(\" \"), [text]);\n const n = words.length;\n\n const lineGap = 12;\n const rowHeight = fontSize;\n const firstDur = 11;\n const pushDur = 15;\n const entryScale = 0.992;\n const entryBlur = 2.4;\n const reflowBlur = 0.7;\n const firstWordY = -14;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n\n const positionsAt = useMemo(() => {\n const out: number[][] = [];\n for (let k = 1; k <= n; k++) {\n const total = rowHeight * k + lineGap * (k - 1);\n const start = -total / 2 + rowHeight / 2;\n const ys: number[] = [];\n for (let j = 0; j < k; j++) ys.push(start + j * (rowHeight + lineGap));\n out.push(ys);\n }\n return out;\n }, [n, rowHeight]);\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <div\n className={className}\n style={{\n position: \"relative\",\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: FONT_FAMILY,\n whiteSpace: \"nowrap\",\n }}\n >\n {words.map((word, j) => {\n const entryStart = j === 0 ? 0 : firstDur + (j - 1) * pushDur;\n const entryEnd = entryStart + (j === 0 ? firstDur : pushDur);\n const targetY = positionsAt[j][j];\n const yFrom = j === 0 ? firstWordY : targetY - entryOffset;\n\n let y = targetY;\n let opacity = 1;\n let scale = 1;\n let blur = 0;\n\n if (frame < entryStart) {\n opacity = 0;\n y = yFrom;\n scale = entryScale;\n blur = entryBlur;\n } else if (frame <= entryEnd) {\n const range: [number, number] = [entryStart, entryEnd];\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n easing,\n };\n y = interpolate(frame, range, [yFrom, targetY], opts);\n opacity = interpolate(frame, range, [0, 1], opts);\n scale = interpolate(frame, range, [entryScale, 1], opts);\n blur = interpolate(frame, range, [entryBlur, 0], opts);\n } else {\n for (let w = j + 1; w < n; w++) {\n const pushStart = firstDur + (w - 1) * pushDur;\n const pushEnd = pushStart + pushDur;\n const fromY = positionsAt[w - 1][j];\n const toY = positionsAt[w][j];\n if (frame >= pushEnd) {\n y = toY;\n } else if (frame >= pushStart) {\n y = interpolate(frame, [pushStart, pushEnd], [fromY, toY], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n blur = interpolate(\n frame,\n [pushStart, (pushStart + pushEnd) / 2, pushEnd],\n [0, reflowBlur, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n break;\n } else {\n y = fromY;\n break;\n }\n }\n }\n\n return (\n <span\n key={j}\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n whiteSpace: \"nowrap\",\n backfaceVisibility: \"hidden\",\n transform: `translate(-50%, -50%) translate3d(0px, ${y}px, 0) scale(${scale})`,\n filter: `blur(${blur}px)`,\n opacity,\n }}\n >\n {word}\n </span>\n );\n })}\n </div>\n </div>\n );\n}\n",
+ "content": "\"use client\";\n\nimport { useMemo } from \"react\";\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface ShortSlideDownProps {\n text: string;\n entryOffset?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nexport function ShortSlideDown({\n text,\n entryOffset = 28,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: ShortSlideDownProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = useMemo(() => text.split(\" \"), [text]);\n const n = words.length;\n\n const lineGap = 12;\n const rowHeight = fontSize;\n const firstDur = 11;\n const pushDur = 15;\n const travelDur = 8;\n const entryScale = 0.992;\n const entryBlur = 2.4;\n const reflowBlur = 0.7;\n const firstWordY = -14;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n\n const positionsAt = useMemo(() => {\n const out: number[][] = [];\n for (let k = 1; k <= n; k++) {\n const total = rowHeight * k + lineGap * (k - 1);\n const start = -total / 2 + rowHeight / 2;\n const ys: number[] = [];\n for (let j = 0; j < k; j++) ys.push(start + j * (rowHeight + lineGap));\n out.push(ys);\n }\n return out;\n }, [n, rowHeight]);\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <div\n className={className}\n style={{\n position: \"relative\",\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: FONT_FAMILY,\n whiteSpace: \"nowrap\",\n }}\n >\n {words.map((word, j) => {\n const entryStart = j === 0 ? 0 : firstDur + (j - 1) * pushDur;\n const entryEnd = entryStart + (j === 0 ? firstDur : pushDur);\n const targetY = positionsAt[j][j];\n const yFrom = j === 0 ? firstWordY : targetY - entryOffset;\n\n let y = targetY;\n let opacity = 1;\n let scale = 1;\n let blur = 0;\n\n if (frame < entryStart) {\n opacity = 0;\n y = yFrom;\n scale = entryScale;\n blur = entryBlur;\n } else if (frame <= entryEnd) {\n const range: [number, number] = [entryStart, entryEnd];\n const travelRange: [number, number] = [\n entryStart,\n Math.min(entryStart + travelDur, entryEnd),\n ];\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n easing,\n };\n y = interpolate(frame, travelRange, [yFrom, targetY], opts);\n opacity = interpolate(frame, range, [0, 1], opts);\n scale = interpolate(frame, range, [entryScale, 1], opts);\n blur = interpolate(frame, range, [entryBlur, 0], opts);\n } else {\n for (let w = j + 1; w < n; w++) {\n const pushStart = firstDur + (w - 1) * pushDur;\n const pushEnd = pushStart + pushDur;\n const fromY = positionsAt[w - 1][j];\n const toY = positionsAt[w][j];\n if (frame >= pushEnd) {\n y = toY;\n } else if (frame >= pushStart) {\n y = interpolate(\n frame,\n [pushStart, Math.min(pushStart + travelDur, pushEnd)],\n [fromY, toY],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n },\n );\n blur = interpolate(\n frame,\n [pushStart, (pushStart + pushEnd) / 2, pushEnd],\n [0, reflowBlur, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n break;\n } else {\n y = fromY;\n break;\n }\n }\n }\n\n return (\n <span\n key={j}\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n whiteSpace: \"nowrap\",\n backfaceVisibility: \"hidden\",\n transform: `translate(-50%, -50%) translate3d(0px, ${y}px, 0) scale(${scale})`,\n filter: `blur(${blur}px)`,\n opacity,\n }}\n >\n {word}\n </span>\n );\n })}\n </div>\n </div>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/short-slide-down.tsx"
}
diff --git a/registry-artifacts/short-slide-right.json b/registry-artifacts/short-slide-right.json
index fefde439..b6b74009 100644
--- a/registry-artifacts/short-slide-right.json
+++ b/registry-artifacts/short-slide-right.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/remocn/short-slide-right/index.tsx",
- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface ShortSlideRightProps {\n text: string;\n distance?: number;\n staggerDelay?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function ShortSlideRight({\n text,\n distance = 24,\n staggerDelay = 3,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: ShortSlideRightProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = text.split(\" \");\n\n const enterDur = 16;\n const wordOpacityDur = 6;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n\n const x = interpolate(frame, [0, enterDur], [-distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n const blurVal = interpolate(frame, [0, enterDur], [1.2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n display: \"inline-block\",\n transform: `translateX(${x}px)`,\n filter: `blur(${blurVal}px)`,\n }}\n >\n {words.map((word, i) => {\n const opacity = interpolate(\n frame - i * staggerDelay,\n [0, wordOpacityDur],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n },\n );\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n opacity,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface ShortSlideRightProps {\n text: string;\n distance?: number;\n staggerDelay?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function ShortSlideRight({\n text,\n distance = 24,\n staggerDelay = 3,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: ShortSlideRightProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = text.split(\" \");\n\n const enterDur = 16;\n const travelDur = 8;\n const wordOpacityDur = 6;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n\n const x = interpolate(frame, [0, travelDur], [-distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n const blurVal = interpolate(frame, [0, enterDur], [1.2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n display: \"inline-block\",\n transform: `translateX(${x}px)`,\n filter: `blur(${blurVal}px)`,\n }}\n >\n {words.map((word, i) => {\n const opacity = interpolate(\n frame - i * staggerDelay,\n [0, wordOpacityDur],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n },\n );\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n opacity,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/short-slide-right.tsx"
}
diff --git a/registry-artifacts/soft-blur-in.json b/registry-artifacts/soft-blur-in.json
index 0073e78f..eed26a89 100644
--- a/registry-artifacts/soft-blur-in.json
+++ b/registry-artifacts/soft-blur-in.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/remocn/soft-blur-in/index.tsx",
- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface SoftBlurInProps {\n text: string;\n blur?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function SoftBlurIn({\n text,\n blur = 12,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: SoftBlurInProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 27;\n const staggerFrames = 1;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerFrames;\n const easing = Easing.bezier(0.22, 1, 0.36, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charDurationFrames], [16, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const blurAmount = interpolate(\n local,\n [0, charDurationFrames],\n [blur, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\", easing },\n );\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n filter: `blur(${blurAmount}px)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface SoftBlurInProps {\n text: string;\n blur?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function SoftBlurIn({\n text,\n blur = 12,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: SoftBlurInProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 27;\n const charTravelFrames = 9;\n const staggerFrames = 1;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerFrames;\n const easing = Easing.bezier(0.22, 1, 0.36, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [16, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const blurAmount = interpolate(\n local,\n [0, charDurationFrames],\n [blur, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\", easing },\n );\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n filter: `blur(${blurAmount}px)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/soft-blur-in.tsx"
}
diff --git a/registry-artifacts/top-down-letters.json b/registry-artifacts/top-down-letters.json
index 5a43e2a0..8d420086 100644
--- a/registry-artifacts/top-down-letters.json
+++ b/registry-artifacts/top-down-letters.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/remocn/top-down-letters/index.tsx",
- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface TopDownLettersProps {\n text: string;\n staggerDelay?: number;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function TopDownLetters({\n text,\n staggerDelay = 3,\n distance = 46,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: TopDownLettersProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 12;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerDelay;\n const easing = Easing.bezier(0.18, 1, 0.32, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(\n local,\n [0, charDurationFrames],\n [-distance, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\", easing },\n );\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface TopDownLettersProps {\n text: string;\n staggerDelay?: number;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function TopDownLetters({\n text,\n staggerDelay = 3,\n distance = 46,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: TopDownLettersProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 12;\n const charTravelFrames = 7;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerDelay;\n const easing = Easing.bezier(0.18, 1, 0.32, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [-distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/top-down-letters.tsx"
}
diff --git a/registry/remocn/blur-out-up/index.tsx b/registry/remocn/blur-out-up/index.tsx
index 988953e5..9457f5c4 100644
--- a/registry/remocn/blur-out-up/index.tsx
+++ b/registry/remocn/blur-out-up/index.tsx
@@ -27,7 +27,9 @@ export function BlurOutUp({
const words = text.split(" ");
const enterDur = 17;
+ const enterTravel = 6;
const exitDur = 14;
+ const exitTravelFrom = 8;
const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);
const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);
@@ -78,17 +80,22 @@ export function BlurOutUp({
const opacity = enterP * (1 - exitP);
- const yEnter = interpolate(enterLocal, [0, enterDur], [10, 0], {
+ const yEnter = interpolate(enterLocal, [0, enterTravel], [10, 0], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
easing: enterEasing,
});
- const yExit = interpolate(exitLocal, [0, exitDur], [0, -14], {
- extrapolateLeft: "clamp",
- extrapolateRight: "clamp",
- easing: exitEasing,
- });
+ const yExit = interpolate(
+ exitLocal,
+ [exitTravelFrom, exitDur],
+ [0, -14],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: exitEasing,
+ },
+ );
const y = yEnter + yExit;
diff --git a/registry/remocn/bottom-up-letters/index.tsx b/registry/remocn/bottom-up-letters/index.tsx
index 937cd383..6f74e799 100644
--- a/registry/remocn/bottom-up-letters/index.tsx
+++ b/registry/remocn/bottom-up-letters/index.tsx
@@ -27,6 +27,7 @@ export function BottomUpLetters({
const chars = Array.from(text);
const charDurationFrames = 12;
+ const charTravelFrames = 7;
return (
<div
@@ -58,7 +59,7 @@ export function BottomUpLetters({
extrapolateRight: "clamp",
easing,
});
- const y = interpolate(local, [0, charDurationFrames], [distance, 0], {
+ const y = interpolate(local, [0, charTravelFrames], [distance, 0], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
easing,
diff --git a/registry/remocn/kinetic-center-build/index.tsx b/registry/remocn/kinetic-center-build/index.tsx
index 8a3506ba..2e07436f 100644
--- a/registry/remocn/kinetic-center-build/index.tsx
+++ b/registry/remocn/kinetic-center-build/index.tsx
@@ -53,6 +53,7 @@ export function KineticCenterBuild({
const gap = 10;
const firstDur = 10;
const pushDur = 13;
+ const travelDur = 7;
const entryScale = 0.992;
const entryBlur = 3.5;
const reflowBlur = 0.8;
@@ -120,16 +121,23 @@ export function KineticCenterBuild({
y = j === 0 ? firstWordY : 0;
} else if (frame <= entryEnd) {
const range: [number, number] = [entryStart, entryEnd];
+ const travelRange: [number, number] = [
+ entryStart,
+ Math.min(entryStart + travelDur, entryEnd),
+ ];
const opts = {
extrapolateLeft: "clamp" as const,
extrapolateRight: "clamp" as const,
easing,
};
- x = interpolate(frame, range, [xFrom, targetX], opts);
+ x = interpolate(frame, travelRange, [xFrom, targetX], opts);
opacity = interpolate(frame, range, [0, 1], opts);
scale = interpolate(frame, range, [entryScale, 1], opts);
blur = interpolate(frame, range, [entryBlur, 0], opts);
- y = j === 0 ? interpolate(frame, range, [firstWordY, 0], opts) : 0;
+ y =
+ j === 0
+ ? interpolate(frame, travelRange, [firstWordY, 0], opts)
+ : 0;
} else {
for (let w = j + 1; w < n; w++) {
const pushStart = firstDur + (w - 1) * pushDur;
@@ -139,11 +147,16 @@ export function KineticCenterBuild({
if (frame >= pushEnd) {
x = toX;
} else if (frame >= pushStart) {
- x = interpolate(frame, [pushStart, pushEnd], [fromX, toX], {
- extrapolateLeft: "clamp",
- extrapolateRight: "clamp",
- easing,
- });
+ x = interpolate(
+ frame,
+ [pushStart, Math.min(pushStart + travelDur, pushEnd)],
+ [fromX, toX],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing,
+ },
+ );
blur = interpolate(
frame,
[pushStart, (pushStart + pushEnd) / 2, pushEnd],
diff --git a/registry/remocn/line-by-line-slide/index.tsx b/registry/remocn/line-by-line-slide/index.tsx
index 10904f36..10c294d8 100644
--- a/registry/remocn/line-by-line-slide/index.tsx
+++ b/registry/remocn/line-by-line-slide/index.tsx
@@ -27,7 +27,9 @@ export function LineByLineSlide({
const lines = text.split("\n");
const enterDur = 27;
+ const enterTravel = 14;
const exitDur = 18;
+ const exitTravelFrom = 8;
const enterStagger = 4;
const exitStagger = 2;
@@ -84,7 +86,7 @@ export function LineByLineSlide({
const xEnter = interpolate(
enterLocal,
- [0, enterDur],
+ [0, enterTravel],
[-distance, 0],
{
extrapolateLeft: "clamp",
@@ -93,11 +95,16 @@ export function LineByLineSlide({
},
);
- const xExit = interpolate(exitLocal, [0, exitDur], [0, distance], {
- extrapolateLeft: "clamp",
- extrapolateRight: "clamp",
- easing: exitEasing,
- });
+ const xExit = interpolate(
+ exitLocal,
+ [exitTravelFrom, exitDur],
+ [0, distance],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: exitEasing,
+ },
+ );
const x = xEnter + xExit;
diff --git a/registry/remocn/mask-reveal-up/index.tsx b/registry/remocn/mask-reveal-up/index.tsx
index 10764214..7938e7ef 100644
--- a/registry/remocn/mask-reveal-up/index.tsx
+++ b/registry/remocn/mask-reveal-up/index.tsx
@@ -27,7 +27,9 @@ export function MaskRevealUp({
const lines = text.split("\n");
const enterDur = 23;
+ const enterTravel = 11;
const exitDur = 16;
+ const exitTravelFrom = 8;
const enterStagger = 3;
const exitStagger = 2;
@@ -82,17 +84,27 @@ export function MaskRevealUp({
const opacity = enterP * (1 - exitP);
- const yEnter = interpolate(enterLocal, [0, enterDur], [distance, 0], {
- extrapolateLeft: "clamp",
- extrapolateRight: "clamp",
- easing: enterEasing,
- });
+ const yEnter = interpolate(
+ enterLocal,
+ [0, enterTravel],
+ [distance, 0],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: enterEasing,
+ },
+ );
- const yExit = interpolate(exitLocal, [0, exitDur], [0, -22], {
- extrapolateLeft: "clamp",
- extrapolateRight: "clamp",
- easing: exitEasing,
- });
+ const yExit = interpolate(
+ exitLocal,
+ [exitTravelFrom, exitDur],
+ [0, -22],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: exitEasing,
+ },
+ );
const y = yEnter + yExit;
diff --git a/registry/remocn/per-character-rise/index.tsx b/registry/remocn/per-character-rise/index.tsx
index 06cf86f8..9ab6f456 100644
--- a/registry/remocn/per-character-rise/index.tsx
+++ b/registry/remocn/per-character-rise/index.tsx
@@ -25,6 +25,7 @@ export function PerCharacterRise({
const chars = Array.from(text);
const charDurationFrames = 21;
+ const charTravelFrames = 10;
const staggerFrames = 1;
return (
@@ -52,15 +53,16 @@ export function PerCharacterRise({
{chars.map((char, i) => {
const local = frame - i * staggerFrames;
const easing = Easing.bezier(0.2, 0.8, 0.2, 1);
+ const travelEasing = Easing.bezier(0.2, 0.8, 0.6, 0.85);
const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
easing,
});
- const y = interpolate(local, [0, charDurationFrames], [distance, 0], {
+ const y = interpolate(local, [0, charTravelFrames], [distance, 0], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
- easing,
+ easing: travelEasing,
});
return (
<span
diff --git a/registry/remocn/per-word-crossfade/index.tsx b/registry/remocn/per-word-crossfade/index.tsx
index bd18f381..96f3cb47 100644
--- a/registry/remocn/per-word-crossfade/index.tsx
+++ b/registry/remocn/per-word-crossfade/index.tsx
@@ -27,7 +27,9 @@ export function PerWordCrossfade({
const toWords = toText.split(" ");
const enterDur = 21;
+ const enterTravel = 5;
const exitDur = 15;
+ const exitTravelFrom = 6;
const enterStagger = 2;
const exitStagger = 1;
const overlapF = 5;
@@ -76,7 +78,7 @@ export function PerWordCrossfade({
extrapolateRight: "clamp",
easing: exitEasing,
});
- const y = interpolate(local, [0, exitDur], [0, -6], {
+ const y = interpolate(local, [exitTravelFrom, exitDur], [0, -6], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
easing: exitEasing,
@@ -124,7 +126,7 @@ export function PerWordCrossfade({
extrapolateRight: "clamp",
easing: enterEasing,
});
- const y = interpolate(local, [0, enterDur], [8, 0], {
+ const y = interpolate(local, [0, enterTravel], [8, 0], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
easing: enterEasing,
diff --git a/registry/remocn/short-slide-down/index.tsx b/registry/remocn/short-slide-down/index.tsx
index 7fd79dec..52a8dbb0 100644
--- a/registry/remocn/short-slide-down/index.tsx
+++ b/registry/remocn/short-slide-down/index.tsx
@@ -34,6 +34,7 @@ export function ShortSlideDown({
const rowHeight = fontSize;
const firstDur = 11;
const pushDur = 15;
+ const travelDur = 8;
const entryScale = 0.992;
const entryBlur = 2.4;
const reflowBlur = 0.7;
@@ -93,12 +94,16 @@ export function ShortSlideDown({
blur = entryBlur;
} else if (frame <= entryEnd) {
const range: [number, number] = [entryStart, entryEnd];
+ const travelRange: [number, number] = [
+ entryStart,
+ Math.min(entryStart + travelDur, entryEnd),
+ ];
const opts = {
extrapolateLeft: "clamp" as const,
extrapolateRight: "clamp" as const,
easing,
};
- y = interpolate(frame, range, [yFrom, targetY], opts);
+ y = interpolate(frame, travelRange, [yFrom, targetY], opts);
opacity = interpolate(frame, range, [0, 1], opts);
scale = interpolate(frame, range, [entryScale, 1], opts);
blur = interpolate(frame, range, [entryBlur, 0], opts);
@@ -111,11 +116,16 @@ export function ShortSlideDown({
if (frame >= pushEnd) {
y = toY;
} else if (frame >= pushStart) {
- y = interpolate(frame, [pushStart, pushEnd], [fromY, toY], {
- extrapolateLeft: "clamp",
- extrapolateRight: "clamp",
- easing,
- });
+ y = interpolate(
+ frame,
+ [pushStart, Math.min(pushStart + travelDur, pushEnd)],
+ [fromY, toY],
+ {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing,
+ },
+ );
blur = interpolate(
frame,
[pushStart, (pushStart + pushEnd) / 2, pushEnd],
diff --git a/registry/remocn/short-slide-right/index.tsx b/registry/remocn/short-slide-right/index.tsx
index d9783d1a..84e16141 100644
--- a/registry/remocn/short-slide-right/index.tsx
+++ b/registry/remocn/short-slide-right/index.tsx
@@ -28,10 +28,11 @@ export function ShortSlideRight({
const words = text.split(" ");
const enterDur = 16;
+ const travelDur = 8;
const wordOpacityDur = 6;
const easing = Easing.bezier(0.2, 0.8, 0.2, 1);
- const x = interpolate(frame, [0, enterDur], [-distance, 0], {
+ const x = interpolate(frame, [0, travelDur], [-distance, 0], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
easing,
diff --git a/registry/remocn/soft-blur-in/index.tsx b/registry/remocn/soft-blur-in/index.tsx
index f26850d0..5b59195d 100644
--- a/registry/remocn/soft-blur-in/index.tsx
+++ b/registry/remocn/soft-blur-in/index.tsx
@@ -25,6 +25,7 @@ export function SoftBlurIn({
const chars = Array.from(text);
const charDurationFrames = 27;
+ const charTravelFrames = 9;
const staggerFrames = 1;
return (
@@ -57,7 +58,7 @@ export function SoftBlurIn({
extrapolateRight: "clamp",
easing,
});
- const y = interpolate(local, [0, charDurationFrames], [16, 0], {
+ const y = interpolate(local, [0, charTravelFrames], [16, 0], {
extrapolateLeft: "clamp",
extrapolateRight: "clamp",
easing,
diff --git a/registry/remocn/top-down-letters/index.tsx b/registry/remocn/top-down-letters/index.tsx
index 6e7e90da..a5533e63 100644
--- a/registry/remocn/top-down-letters/index.tsx
+++ b/registry/remocn/top-down-letters/index.tsx
@@ -27,6 +27,7 @@ export function TopDownLetters({
const chars = Array.from(text);
const charDurationFrames = 12;
+ const charTravelFrames = 7;
return (
<div
@@ -58,12 +59,11 @@ export function TopDownLetters({
extrapolateRight: "clamp",
easing,
});
- const y = interpolate(
- local,
- [0, charDurationFrames],
- [-distance, 0],
- { extrapolateLeft: "clamp", extrapolateRight: "clamp", easing },
- );
+ const y = interpolate(local, [0, charTravelFrames], [-distance, 0], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing,
+ });
return (
<span
key={i}
diff --git a/skills/remocn/references/anti-patterns.md b/skills/remocn/references/anti-patterns.md
index a155d545..1373e1a2 100644
--- a/skills/remocn/references/anti-patterns.md
+++ b/skills/remocn/references/anti-patterns.md
@@ -93,3 +93,17 @@ ALL-CAPS + wide tracking + gradient text + glow shadows on text *you* add. See `
Stagger sibling entrances (3–6f). Landing a whole group simultaneously reads robotic. See
`motion-principles.md` → Follow-Through & Overlapping Action.
+
+## 12. Promoting the wrong layer under a slow zoom
+
+Text under `drift` trembles — glyph rasters snap to whole device pixels while the zoom keeps them
+in sub-pixel motion. The fix is one `willChange: "transform"` layer per **text container**. Never
+promote per-word/char spans (many small text layers shimmer even at rest) and never `Drift` itself
+(borders become resampled texture — 1px lines pulse between sharp and blurry as the scale creeps).
+See `components/drift.md` → Text under drift.
+
+```tsx
+// ❌ <Drift><div style={{ willChange: "transform" }}>{scene}</div></Drift> — borders pulse
+// ❌ chars.map((c) => <span style={{ willChange: "transform" }}>{c}</span>) — shimmer at rest
+// ✅ bordered card unpromoted; inner text block gets willChange: "transform"
+```