Skip to content

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

feat: mask reveal up

dev_wandry0b95156e799e
diff --git a/content/docs/components.mdx b/content/docs/components.mdx
index 64731fd6..dd0aef6a 100644
--- a/content/docs/components.mdx
+++ b/content/docs/components.mdx
@@ -80,10 +80,10 @@ Text effects, reveals, and kinetic type.
href: "/docs/typography/staggered-fade-up",
},
{
- name: "MaskedSlideReveal",
- description: "Lines grow out from behind an invisible horizontal mask",
+ name: "MaskRevealUp",
+ description: "Lines reveal upward with a soft masked feel and compact stagger",
status: "stable",
- href: "/docs/typography/masked-slide-reveal",
+ href: "/docs/typography/mask-reveal-up",
},
{
name: "TrackingIn",
diff --git a/content/docs/typography/index.mdx b/content/docs/typography/index.mdx
index be0b8708..bd8f77af 100644
--- a/content/docs/typography/index.mdx
+++ b/content/docs/typography/index.mdx
@@ -76,10 +76,10 @@ Every way text can move, fade, glitch, or stretch across the screen. From quiet
href: "/docs/typography/staggered-fade-up",
},
{
- name: "MaskedSlideReveal",
- description: "Lines grow out from behind an invisible horizontal mask",
+ name: "MaskRevealUp",
+ description: "Lines reveal upward with a soft masked feel and compact stagger",
status: "stable",
- href: "/docs/typography/masked-slide-reveal",
+ href: "/docs/typography/mask-reveal-up",
},
{
name: "TrackingIn",
diff --git a/content/docs/typography/mask-reveal-up.mdx b/content/docs/typography/mask-reveal-up.mdx
new file mode 100644
index 00000000..b359c749
--- /dev/null
+++ b/content/docs/typography/mask-reveal-up.mdx
@@ -0,0 +1,106 @@
+---
+title: Mask Reveal Up
+description: Lines reveal upward with a soft masked feel and compact stagger
+---
+
+<ComponentPreview name="mask-reveal-up" />
+
+## Installation
+
+<InstallBlock name="mask-reveal-up" />
+
+## Usage
+
+```tsx
+// src/Root.tsx
+import { Composition } from "remotion";
+import { MaskRevealUp } from "@/components/remocn/mask-reveal-up";
+
+const MaskRevealUpScene = () => (
+ <MaskRevealUp text={"Designed to move.\nBuilt to focus."} distance={30} />
+);
+
+export const RemotionRoot = () => (
+ <Composition
+ id="MaskRevealUp"
+ component={MaskRevealUpScene}
+ durationInFrames={90}
+ fps={30}
+ width={1280}
+ height={720}
+ />
+);
+```
+
+The text is split on newline characters into individual lines. Each line rises upward from below, holding steady in the middle of the composition with a soft blur mask, then rises further and blurs out—so the duration should leave room for the staggered entry and exit animations.
+
+### 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 { MaskRevealUp } from "@/components/remocn/mask-reveal-up";
+import { Backdrop } from "@/components/remocn/backdrop";
+
+const MaskRevealUpScene = () => (
+ <Backdrop fill={{ type: "color", value: "#ffffff" }}>
+ <MaskRevealUp text={"Designed to move.\nBuilt to focus."} distance={30} />
+ </Backdrop>
+);
+
+export const RemotionRoot = () => (
+ <Composition
+ id="MaskRevealUp"
+ component={MaskRevealUpScene}
+ durationInFrames={90}
+ fps={30}
+ width={1280}
+ height={720}
+ />
+);
+```
+
+## Props
+
+<PropsTable
+ rows={[
+ {
+ name: "text",
+ type: "string",
+ required: true,
+ description: "The text to animate. Split on newline characters into lines.",
+ },
+ {
+ name: "distance",
+ type: "number",
+ default: "30",
+ description: "Vertical distance in pixels each line rises from on enter.",
+ },
+ {
+ 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/content/docs/typography/masked-slide-reveal.mdx b/content/docs/typography/masked-slide-reveal.mdx
deleted file mode 100644
index 387aae51..00000000
--- a/content/docs/typography/masked-slide-reveal.mdx
+++ /dev/null
@@ -1,81 +0,0 @@
----
-title: Masked Slide Reveal
-description: Words rise out of an invisible horizontal mask with a springy motion
----
-
-<ComponentPreview name="masked-slide-reveal" />
-
-## Installation
-
-<InstallBlock name="masked-slide-reveal" />
-
-## Usage
-
-```tsx
-// src/Root.tsx
-import { Composition } from "remotion";
-import { MaskedSlideReveal } from "@/components/remocn/masked-slide-reveal";
-
-const MaskedSlideRevealScene = () => (
- <MaskedSlideReveal text="Built for Remotion" />
-);
-
-export const RemotionRoot = () => (
- <Composition
- id="MaskedSlideReveal"
- component={MaskedSlideRevealScene}
- durationInFrames={90}
- fps={30}
- width={1280}
- height={720}
- />
-);
-```
-
-## Props
-
-<PropsTable
- rows={[
- {
- name: "text",
- type: "string",
- required: true,
- description: "The text to animate. Split on spaces into words.",
- },
- {
- name: "staggerDelay",
- type: "number",
- default: "3",
- description: "Frames between the start of each word's spring animation",
- },
- {
- name: "fontSize",
- type: "number",
- default: "72",
- description: "Font size in pixels",
- },
- {
- name: "fontWeight",
- type: "number",
- default: "700",
- description: "CSS font-weight",
- },
- {
- name: "color",
- type: "string",
- default: "\"#171717\"",
- description: "Text color (any valid CSS color)",
- },
- {
- name: "speed",
- type: "number",
- default: "1",
- description: "Playback speed multiplier (1 = normal, 2 = twice as fast)",
- },
- {
- name: "className",
- type: "string",
- description: "Optional className passed to the underlying span",
- },
- ]}
-/>
diff --git a/content/docs/typography/meta.json b/content/docs/typography/meta.json
index 390d0bdd..053068e3 100644
--- a/content/docs/typography/meta.json
+++ b/content/docs/typography/meta.json
@@ -14,7 +14,7 @@
"focus-blur-resolve",
"line-by-line-slide",
"staggered-fade-up",
- "masked-slide-reveal",
+ "mask-reveal-up",
"tracking-in",
"inline-highlight",
"marker-highlight",
diff --git a/registry/__index__.tsx b/registry/__index__.tsx
index 3f2e0e3c..63c078df 100644
--- a/registry/__index__.tsx
+++ b/registry/__index__.tsx
@@ -75,8 +75,8 @@ import { LiveCodeCompilation } from "@/registry/remocn/live-code-compilation";
import { liveCodeCompilationConfig } from "@/registry/remocn/live-code-compilation/config";
import { MarkerHighlight } from "@/registry/remocn/marker-highlight";
import { markerHighlightConfig } from "@/registry/remocn/marker-highlight/config";
-import { MaskedSlideReveal } from "@/registry/remocn/masked-slide-reveal";
-import { maskedSlideRevealConfig } from "@/registry/remocn/masked-slide-reveal/config";
+import { MaskRevealUp } from "@/registry/remocn/mask-reveal-up";
+import { maskRevealUpConfig } from "@/registry/remocn/mask-reveal-up/config";
import { MatrixDecode } from "@/registry/remocn/matrix-decode";
import { matrixDecodeConfig } from "@/registry/remocn/matrix-decode/config";
import { MeshGradientBg } from "@/registry/remocn/mesh-gradient-bg";
@@ -233,9 +233,9 @@ const registry: Record<string, RegistryEntry> = {
Component: StaggeredFadeUp,
config: staggeredFadeUpConfig,
},
- "masked-slide-reveal": {
- Component: MaskedSlideReveal,
- config: maskedSlideRevealConfig,
+ "mask-reveal-up": {
+ Component: MaskRevealUp,
+ config: maskRevealUpConfig,
},
"tracking-in": { Component: TrackingIn, config: trackingInConfig },
"shimmer-sweep": { Component: ShimmerSweep, config: shimmerSweepConfig },
diff --git a/registry/remocn/masked-slide-reveal/config.ts b/registry/remocn/mask-reveal-up/config.ts
similarity index 60%
rename from registry/remocn/masked-slide-reveal/config.ts
rename to registry/remocn/mask-reveal-up/config.ts
index 4859d30b..f72679be 100644
--- a/registry/remocn/masked-slide-reveal/config.ts
+++ b/registry/remocn/mask-reveal-up/config.ts
@@ -6,18 +6,18 @@ import {
W,
} from "@/lib/customizer-config";
-export const maskedSlideRevealConfig: ComponentConfig = {
- componentName: "MaskedSlideReveal",
- importPath: "@/components/remocn/masked-slide-reveal",
+export const maskRevealUpConfig: ComponentConfig = {
+ componentName: "MaskRevealUp",
+ importPath: "@/components/remocn/mask-reveal-up",
controls: {
- text: { type: "text", default: "Reveal from the mask", label: "Text" },
- staggerDelay: {
+ text: { type: "text", default: "Designed to move.\nBuilt to focus.", label: "Text" },
+ distance: {
type: "number",
- default: 3,
+ default: 30,
min: 0,
- max: 30,
+ max: 120,
step: 1,
- label: "Stagger delay",
+ label: "Distance",
},
fontSize: {
type: "number",
@@ -30,7 +30,7 @@ export const maskedSlideRevealConfig: ComponentConfig = {
color: { type: "color", default: "#171717", label: "Color" },
fontWeight: {
type: "select",
- default: "700",
+ default: "600",
options: FONT_WEIGHT_OPTIONS,
label: "Font weight",
},
@@ -39,4 +39,5 @@ export const maskedSlideRevealConfig: ComponentConfig = {
fps: FPS,
compositionWidth: W,
compositionHeight: H,
+ previewBackdrop: { type: "color", value: "#ffffff" },
};
diff --git a/registry/remocn/mask-reveal-up/index.tsx b/registry/remocn/mask-reveal-up/index.tsx
new file mode 100644
index 00000000..14fe3bce
--- /dev/null
+++ b/registry/remocn/mask-reveal-up/index.tsx
@@ -0,0 +1,128 @@
+"use client";
+
+import { Easing, interpolate, useCurrentFrame, useVideoConfig } from "remotion";
+
+export interface MaskRevealUpProps {
+ text: string;
+ distance?: number;
+ fontSize?: number;
+ color?: string;
+ fontWeight?: number;
+ speed?: number;
+ className?: string;
+}
+
+export function MaskRevealUp({
+ text,
+ distance = 30,
+ fontSize = 72,
+ color = "#171717",
+ fontWeight = 600,
+ speed = 1,
+ className,
+}: MaskRevealUpProps) {
+ const frame = useCurrentFrame() * speed;
+ const { durationInFrames } = useVideoConfig();
+
+ const lines = text.split("\n");
+
+ const enterDur = 23;
+ const exitDur = 16;
+ const enterStagger = 3;
+ const exitStagger = 2;
+
+ const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);
+ const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);
+
+ const enterEnd = enterDur + (lines.length - 1) * enterStagger;
+ const exitStart = Math.max(enterEnd, durationInFrames - exitDur - (lines.length - 1) * exitStagger);
+
+ 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",
+ lineHeight: 1.1,
+ textAlign: "center",
+ fontFamily:
+ "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",
+ }}
+ >
+ {lines.map((line, i) => {
+ const enterLocal = frame - i * enterStagger;
+ const exitLocal = frame - exitStart - i * exitStagger;
+
+ const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: enterEasing,
+ });
+
+ const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: exitEasing,
+ });
+
+ const opacity = enterP * (1 - exitP);
+
+ const yEnter = interpolate(enterLocal, [0, enterDur], [distance, 0], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: enterEasing,
+ });
+
+ const yExit = interpolate(exitLocal, [0, exitDur], [0, -22], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: exitEasing,
+ });
+
+ const y = yEnter + yExit;
+
+ const blurEnter = interpolate(enterLocal, [0, enterDur], [6, 0], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: enterEasing,
+ });
+
+ const blurExit = interpolate(exitLocal, [0, exitDur], [0, 6], {
+ extrapolateLeft: "clamp",
+ extrapolateRight: "clamp",
+ easing: exitEasing,
+ });
+
+ const blur = blurEnter + blurExit;
+
+ return (
+ <span
+ key={i}
+ style={{
+ display: "block",
+ transformOrigin: "50% 50%",
+ opacity,
+ transform: `translateY(${y}px)`,
+ filter: `blur(${blur}px)`,
+ }}
+ >
+ {line}
+ </span>
+ );
+ })}
+ </span>
+ </div>
+ );
+}
diff --git a/registry/remocn/masked-slide-reveal/index.tsx b/registry/remocn/masked-slide-reveal/index.tsx
deleted file mode 100644
index fd703fa6..00000000
--- a/registry/remocn/masked-slide-reveal/index.tsx
+++ /dev/null
@@ -1,82 +0,0 @@
-"use client";
-
-import { spring, useCurrentFrame, useVideoConfig } from "remotion";
-
-export interface MaskedSlideRevealProps {
- text: string;
- staggerDelay?: number;
- fontSize?: number;
- color?: string;
- fontWeight?: number;
- speed?: number;
- className?: string;
-}
-
-export function MaskedSlideReveal({
- text,
- staggerDelay = 3,
- fontSize = 72,
- color = "#171717",
- fontWeight = 700,
- speed = 1,
- className,
-}: MaskedSlideRevealProps) {
- const frame = useCurrentFrame() * speed;
- const { fps } = useVideoConfig();
-
- const words = text.split(" ");
-
- return (
- <div
- style={{
- position: "absolute",
- inset: 0,
- display: "flex",
- alignItems: "center",
- justifyContent: "center",
- background: "white",
- }}
- >
- <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 t = spring({
- frame: frame - i * staggerDelay,
- fps,
- config: { damping: 14 },
- });
- return (
- <span
- key={i}
- style={{
- display: "inline-block",
- overflow: "hidden",
- verticalAlign: "bottom",
- lineHeight: 1,
- marginRight: "0.25em",
- }}
- >
- <span
- style={{
- display: "inline-block",
- transform: `translateY(${(1 - t) * 100}%)`,
- }}
- >
- {word}
- </span>
- </span>
- );
- })}
- </span>
- </div>
- );
-}
diff --git a/registry/remocn/registry.json b/registry/remocn/registry.json
index 5da413df..cb3c82c2 100644
--- a/registry/remocn/registry.json
+++ b/registry/remocn/registry.json
@@ -232,18 +232,18 @@
]
},
{
- "name": "masked-slide-reveal",
+ "name": "mask-reveal-up",
"type": "registry:component",
- "title": "Masked Slide Reveal",
- "description": "Words slide up out of an invisible horizontal mask, one after another.",
+ "title": "Mask Reveal Up",
+ "description": "Lines reveal upward with a soft masked feel and compact stagger.",
"dependencies": [
"remotion"
],
"files": [
{
- "path": "masked-slide-reveal/index.tsx",
+ "path": "mask-reveal-up/index.tsx",
"type": "registry:component",
- "target": "components/remocn/masked-slide-reveal.tsx"
+ "target": "components/remocn/mask-reveal-up.tsx"
}
]
},