Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: scale down fade
dev_wandry7ca291520d78
diff --git a/content/docs/components.mdx b/content/docs/components.mdxindex 26d9061c..414a8769 100644--- a/content/docs/components.mdx+++ b/content/docs/components.mdx@@ -49,6 +49,12 @@ Text effects, reveals, and kinetic type.status: "stable",href: "/docs/typography/micro-scale-fade",},+ {+ name: "ScaleDownFade",+ description: "Subtle premium settle-in with a restrained scale-down fade on exit",+ status: "stable",+ href: "/docs/typography/scale-down-fade",+ },{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.mdxindex da615487..7dd51f8a 100644--- a/content/docs/typography/index.mdx+++ b/content/docs/typography/index.mdx@@ -45,6 +45,12 @@ Every way text can move, fade, glitch, or stretch across the screen. From quietstatus: "stable",href: "/docs/typography/micro-scale-fade",},+ {+ name: "ScaleDownFade",+ description: "Subtle premium settle-in with a restrained scale-down fade on exit",+ status: "stable",+ href: "/docs/typography/scale-down-fade",+ },{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.jsonindex 0bf5af27..ab17423f 100644--- a/content/docs/typography/meta.json+++ b/content/docs/typography/meta.json@@ -9,6 +9,7 @@"top-down-letters","spring-scale-in","micro-scale-fade",+ "scale-down-fade","staggered-fade-up","masked-slide-reveal","tracking-in",diff --git a/content/docs/typography/scale-down-fade.mdx b/content/docs/typography/scale-down-fade.mdxnew file mode 100644index 00000000..67b8a365--- /dev/null+++ b/content/docs/typography/scale-down-fade.mdx@@ -0,0 +1,100 @@+---+title: Scale Down Fade+description: Subtle premium settle-in with a restrained scale-down fade on exit+---++<ComponentPreview name="scale-down-fade" />++## Installation++<InstallBlock name="scale-down-fade" />++## Usage++```tsx+// src/Root.tsx+import { Composition } from "remotion";+import { ScaleDownFade } from "@/components/remocn/scale-down-fade";++const ScaleDownFadeScene = () => (+ <ScaleDownFade text="Quietly refined." fontSize={72} />+);++export const RemotionRoot = () => (+ <Composition+ id="ScaleDownFade"+ component={ScaleDownFadeScene}+ durationInFrames={90}+ fps={30}+ width={1280}+ height={720}+ />+);+```++The text settles in, holds steady in the middle of the composition, then scales down and fades out near the end—so the duration should leave room for the exit animation.++### 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 { ScaleDownFade } from "@/components/remocn/scale-down-fade";+import { Backdrop } from "@/components/remocn/backdrop";++const ScaleDownFadeScene = () => (+ <Backdrop fill={{ type: "color", value: "#ffffff" }}>+ <ScaleDownFade text="Quietly refined." fontSize={72} />+ </Backdrop>+);++export const RemotionRoot = () => (+ <Composition+ id="ScaleDownFade"+ component={ScaleDownFadeScene}+ durationInFrames={90}+ fps={30}+ width={1280}+ height={720}+ />+);+```++## Props++<PropsTable+ rows={[+ {+ name: "text",+ type: "string",+ required: true,+ description: "The text to animate",+ },+ {+ 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__.tsxindex c9bac6d7..9c3957b1 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -19,6 +19,8 @@ import { SpringScaleIn } from "@/registry/remocn/spring-scale-in";import { springScaleInConfig } from "@/registry/remocn/spring-scale-in/config";import { MicroScaleFade } from "@/registry/remocn/micro-scale-fade";import { microScaleFadeConfig } from "@/registry/remocn/micro-scale-fade/config";+import { ScaleDownFade } from "@/registry/remocn/scale-down-fade";+import { scaleDownFadeConfig } from "@/registry/remocn/scale-down-fade/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";@@ -208,6 +210,7 @@ const registry: Record<string, RegistryEntry> = {"top-down-letters": { Component: TopDownLetters, config: topDownLettersConfig },"spring-scale-in": { Component: SpringScaleIn, config: springScaleInConfig },"micro-scale-fade": { Component: MicroScaleFade, config: microScaleFadeConfig },+ "scale-down-fade": { Component: ScaleDownFade, config: scaleDownFadeConfig },typewriter: { Component: Typewriter, config: typewriterConfig },"inline-highlight": {Component: InlineHighlight,diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex c9de099b..fbd48037 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -99,6 +99,22 @@}]},+ {+ "name": "scale-down-fade",+ "type": "registry:component",+ "title": "Scale Down Fade",+ "description": "Subtle premium settle-in with a restrained scale-down fade on exit.",+ "dependencies": [+ "remotion"+ ],+ "files": [+ {+ "path": "scale-down-fade/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/scale-down-fade.tsx"+ }+ ]+ },{"name": "typewriter","type": "registry:component",diff --git a/registry/remocn/scale-down-fade/config.ts b/registry/remocn/scale-down-fade/config.tsnew file mode 100644index 00000000..d9da3bcd--- /dev/null+++ b/registry/remocn/scale-down-fade/config.ts@@ -0,0 +1,35 @@+import {+ type ComponentConfig,+ FONT_WEIGHT_OPTIONS,+ FPS,+ H,+ W,+} from "@/lib/customizer-config";++export const scaleDownFadeConfig: ComponentConfig = {+ componentName: "ScaleDownFade",+ importPath: "@/components/remocn/scale-down-fade",+ controls: {+ text: { type: "text", default: "Quietly refined.", label: "Text" },+ 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: 90,+ fps: FPS,+ compositionWidth: W,+ compositionHeight: H,+ previewBackdrop: { type: "color", value: "#ffffff" },+};diff --git a/registry/remocn/scale-down-fade/index.tsx b/registry/remocn/scale-down-fade/index.tsxnew file mode 100644index 00000000..335d1c47--- /dev/null+++ b/registry/remocn/scale-down-fade/index.tsx@@ -0,0 +1,109 @@+"use client";++import { Easing, interpolate, useCurrentFrame, useVideoConfig } from "remotion";++export interface ScaleDownFadeProps {+ text: string;+ fontSize?: number;+ color?: string;+ fontWeight?: number;+ speed?: number;+ className?: string;+}++export function ScaleDownFade({+ text,+ fontSize = 72,+ color = "#171717",+ fontWeight = 600,+ speed = 1,+ className,+}: ScaleDownFadeProps) {+ const frame = useCurrentFrame() * speed;+ const { durationInFrames } = useVideoConfig();++ const enterDurFrames = 16;+ const exitDurFrames = 11;+ const exitStart = Math.max(enterDurFrames, durationInFrames - exitDurFrames);++ const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);+ const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);++ const enterP = interpolate(frame, [0, enterDurFrames], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: enterEasing,+ });++ const exitP = interpolate(frame, [exitStart, durationInFrames], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: exitEasing,+ });++ const opacity = enterP * (1 - exitP);++ const yEnter = interpolate(frame, [0, enterDurFrames], [8, 0], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: enterEasing,+ });++ const yExit = interpolate(frame, [exitStart, durationInFrames], [0, -8], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: exitEasing,+ });++ const y = yEnter + yExit;++ const scaleEnter = interpolate(frame, [0, enterDurFrames], [1.04, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: enterEasing,+ });++ const scaleExitDelta = interpolate(+ frame,+ [exitStart, durationInFrames],+ [0, -0.06],+ {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: exitEasing,+ }+ );++ const scale = scaleEnter + scaleExitDelta;++ 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",+ display: "inline-block",+ transformOrigin: "50% 50%",+ opacity,+ transform: `translateY(${y}px) scale(${scale})`,+ }}+ >+ {text}+ </span>+ </div>+ );+}