Skip to content

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

feat: spring-scale-in

dev_wandry7e01d556ffbe
diff --git a/content/docs/components.mdx b/content/docs/components.mdx
index 8ab5c066..b7c22870 100644
--- a/content/docs/components.mdx
+++ b/content/docs/components.mdx
@@ -37,6 +37,12 @@ Text effects, reveals, and kinetic type.
status: "stable",
href: "/docs/typography/top-down-letters",
},
+ {
+ name: "SpringScaleIn",
+ description: "Words pop in with a soft overshoot scale, like a spring settling",
+ status: "stable",
+ href: "/docs/typography/spring-scale-in",
+ },
{
name: "StaggeredFadeUp",
description: "Words rise from below with a soft cascading delay",
diff --git a/content/docs/typography/index.mdx b/content/docs/typography/index.mdx
index d8d8aa6f..9977413b 100644
--- a/content/docs/typography/index.mdx
+++ b/content/docs/typography/index.mdx
@@ -33,6 +33,12 @@ Every way text can move, fade, glitch, or stretch across the screen. From quiet
status: "stable",
href: "/docs/typography/top-down-letters",
},
+ {
+ name: "SpringScaleIn",
+ description: "Words pop in with a soft overshoot scale, like a spring settling",
+ status: "stable",
+ href: "/docs/typography/spring-scale-in",
+ },
{
name: "StaggeredFadeUp",
description: "Words rise from below with a soft cascading delay",
diff --git a/content/docs/typography/meta.json b/content/docs/typography/meta.json
index 0e1d89ae..e2fc47c9 100644
--- a/content/docs/typography/meta.json
+++ b/content/docs/typography/meta.json
@@ -7,6 +7,7 @@
"per-character-rise",
"bottom-up-letters",
"top-down-letters",
+ "spring-scale-in",
"staggered-fade-up",
"masked-slide-reveal",
"tracking-in",
diff --git a/content/docs/typography/spring-scale-in.mdx b/content/docs/typography/spring-scale-in.mdx
new file mode 100644
index 00000000..3c70e4b7
--- /dev/null
+++ b/content/docs/typography/spring-scale-in.mdx
@@ -0,0 +1,110 @@
+---
+title: Spring Scale In
+description: Words pop in with a soft overshoot scale, like a spring settling into place
+---
+
+<ComponentPreview name="spring-scale-in" />
+
+## Installation
+
+<InstallBlock name="spring-scale-in" />
+
+## Usage
+
+```tsx
+// src/Root.tsx
+import { Composition } from "remotion";
+import { SpringScaleIn } from "@/components/remocn/spring-scale-in";
+
+const SpringScaleInScene = () => (
+ <SpringScaleIn text="Fast. Crisp. Fluid." staggerDelay={3} scaleFrom={0.7} />
+);
+
+export const RemotionRoot = () => (
+ <Composition
+ id="SpringScaleIn"
+ component={SpringScaleInScene}
+ durationInFrames={60}
+ fps={30}
+ width={1280}
+ height={720}
+ />
+);
+```
+
+### With Backdrop
+
+The component renders transparent — supply the background via `Backdrop`. It ships single-theme; edit the copied file to re-theme colors.
+
+Pair with `Backdrop` to place the text inside a full-frame fill with a rounded, shadowed content frame:
+
+```tsx
+import { Composition } from "remotion";
+import { SpringScaleIn } from "@/components/remocn/spring-scale-in";
+import { Backdrop } from "@/components/remocn/backdrop";
+
+const SpringScaleInScene = () => (
+ <Backdrop fill={{ type: "color", value: "#ffffff" }}>
+ <SpringScaleIn text="Fast. Crisp. Fluid." staggerDelay={3} scaleFrom={0.7} />
+ </Backdrop>
+);
+
+export const RemotionRoot = () => (
+ <Composition
+ id="SpringScaleIn"
+ component={SpringScaleInScene}
+ durationInFrames={60}
+ fps={30}
+ width={1280}
+ height={720}
+ />
+);
+```
+
+## Props
+
+<PropsTable
+ rows={[
+ {
+ name: "text",
+ type: "string",
+ required: true,
+ description: "The text to animate",
+ },
+ {
+ name: "staggerDelay",
+ type: "number",
+ default: "3",
+ description: "Per-word delay in frames between each word popping in.",
+ },
+ {
+ name: "scaleFrom",
+ type: "number",
+ default: "0.7",
+ description: "Starting scale each word grows from. The easing overshoots slightly past 1 before settling.",
+ },
+ {
+ name: "fontSize",
+ type: "number",
+ default: "72",
+ description: "Font size in pixels",
+ },
+ {
+ name: "fontWeight",
+ type: "number",
+ default: "600",
+ description: "CSS font-weight",
+ },
+ {
+ name: "color",
+ type: "string",
+ default: "\"#171717\"",
+ description: "Text color (any valid CSS color)",
+ },
+ {
+ name: "className",
+ type: "string",
+ description: "Optional className passed to the underlying span",
+ },
+ ]}
+/>
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index fd469fe5..47e8fead 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -15,6 +15,8 @@ import { BottomUpLetters } from "@/registry/remocn/bottom-up-letters";
import { bottomUpLettersConfig } from "@/registry/remocn/bottom-up-letters/config";
import { TopDownLetters } from "@/registry/remocn/top-down-letters";
import { topDownLettersConfig } from "@/registry/remocn/top-down-letters/config";
+import { SpringScaleIn } from "@/registry/remocn/spring-scale-in";
+import { springScaleInConfig } from "@/registry/remocn/spring-scale-in/config";
import { BrowserFlow } from "@/registry/remocn/browser-flow";
import { browserFlowConfig } from "@/registry/remocn/browser-flow/config";
import { ChatToPreviewLayout } from "@/registry/remocn/chat-to-preview-layout";
@@ -202,6 +204,7 @@ const registry: Record<string, RegistryEntry> = {
"per-character-rise": { Component: PerCharacterRise, config: perCharacterRiseConfig },
"bottom-up-letters": { Component: BottomUpLetters, config: bottomUpLettersConfig },
"top-down-letters": { Component: TopDownLetters, config: topDownLettersConfig },
+ "spring-scale-in": { Component: SpringScaleIn, config: springScaleInConfig },
typewriter: { Component: Typewriter, config: typewriterConfig },
"inline-highlight": {
Component: InlineHighlight,
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index c98ca030..fccb7751 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -67,6 +67,22 @@
}
]
},
+ {
+ "name": "spring-scale-in",
+ "type": "registry:component",
+ "title": "Spring Scale In",
+ "description": "Words pop in with a soft overshoot scale, like a physical spring settling into place.",
+ "dependencies": [
+ "remotion"
+ ],
+ "files": [
+ {
+ "path": "spring-scale-in/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/spring-scale-in.tsx"
+ }
+ ]
+ },
{
"name": "typewriter",
"type": "registry:component",
diff --git a/registry/remocn/spring-scale-in/config.ts b/registry/remocn/spring-scale-in/config.ts
new file mode 100644
index 00000000..fa3427be
--- /dev/null
+++ b/registry/remocn/spring-scale-in/config.ts
@@ -0,0 +1,51 @@
+import {
+ type ComponentConfig,
+ FONT_WEIGHT_OPTIONS,
+ FPS,
+ H,
+ W,
+} from "@/lib/customizer-config";
+
+export const springScaleInConfig: ComponentConfig = {
+ componentName: "SpringScaleIn",
+ importPath: "@/components/remocn/spring-scale-in",
+ controls: {
+ text: { type: "text", default: "Fast. Crisp. Fluid.", label: "Text" },
+ staggerDelay: {
+ type: "number",
+ default: 3,
+ min: 1,
+ max: 12,
+ step: 1,
+ label: "Stagger",
+ },
+ scaleFrom: {
+ type: "number",
+ default: 0.7,
+ min: 0.1,
+ max: 1,
+ step: 0.05,
+ label: "Scale from",
+ },
+ fontSize: {
+ type: "number",
+ default: 72,
+ min: 12,
+ max: 160,
+ step: 1,
+ label: "Font size",
+ },
+ color: { type: "color", default: "#171717", label: "Color" },
+ fontWeight: {
+ type: "select",
+ default: "600",
+ options: FONT_WEIGHT_OPTIONS,
+ label: "Font weight",
+ },
+ },
+ durationInFrames: 60,
+ fps: FPS,
+ compositionWidth: W,
+ compositionHeight: H,
+ previewBackdrop: { type: "color", value: "#ffffff" },
+};
diff --git a/registry/remocn/spring-scale-in/index.tsx b/registry/remocn/spring-scale-in/index.tsx
new file mode 100644
index 00000000..0c877e00
--- /dev/null
+++ b/registry/remocn/spring-scale-in/index.tsx
@@ -0,0 +1,84 @@
+"use client";
+
+import { Easing, interpolate, useCurrentFrame } from "remotion";
+
+export interface SpringScaleInProps {
+ text: string;
+ staggerDelay?: number;
+ scaleFrom?: number;
+ fontSize?: number;
+ color?: string;
+ fontWeight?: number;
+ speed?: number;
+ className?: string;
+}
+
+export function SpringScaleIn({
+ text,
+ staggerDelay = 3,
+ scaleFrom = 0.7,
+ fontSize = 72,
+ color = "#171717",
+ fontWeight = 600,
+ speed = 1,
+ className,
+}: SpringScaleInProps) {
+ const frame = useCurrentFrame() * speed;
+
+ const words = text.split(" ");
+ const wordDurationFrames = 11;
+ const easing = Easing.bezier(0.34, 1.56, 0.64, 1);
+
+ return (
+ <div
+ style={{
+ position: "absolute",
+ inset: 0,
+ display: "flex",
+ alignItems: "center",
+ justifyContent: "center",
+ background: "transparent",
+ }}
+ >
+ <span
+ className={className}
+ style={{
+ fontSize,
+ fontWeight,
+ color,
+ letterSpacing: "-0.03em",
+ fontFamily:
+ "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",
+ }}
+ >
+ {words.map((word, i) => {
+ const local = frame - i * staggerDelay;
+ const opacity = interpolate(local, [0, wordDurationFrames], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing,
+ });
+ const scale = interpolate(local, [0, wordDurationFrames], [scaleFrom, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing,
+ });
+ return (
+ <span
+ key={i}
+ style={{
+ display: "inline-block",
+ marginRight: "0.25em",
+ transformOrigin: "50% 50%",
+ opacity,
+ transform: `scale(${scale})`,
+ }}
+ >
+ {word}
+ </span>
+ );
+ })}
+ </span>
+ </div>
+ );
+}