Gradient Scale Cut Text

An oversized gradient reveal snaps to a compact blurred line that settles into focus

Installation

$ pnpm dlx shadcn@latest add @remocn/gradient-scale-cut-text

Usage

GradientScaleCutText begins with an oversized line moving left while a soft mask uncovers a fixed orange-to-white text gradient. On frame 13 it switches to a separate compact layer with no intermediate scale. That layer slides into its final position while clearing its blur, then remains fixed in both position and size as the same reveal continues across the remaining letters. At completion, the soft mask edge travels beyond the text box so the final letter is fully filled rather than left under the reveal fade. The text layers use a descender-safe line box, preventing letters such as g, p, and y from being clipped without moving the baseline.

The two layers never crossfade. Their opacity stays constant, and a discrete visibility condition creates the scale cut between adjacent frames.

// src/Root.tsx
import { Composition } from "remotion";
import { GradientScaleCutText } from "@/components/remocn/gradient-scale-cut-text";
 
const GradientScaleCutTextScene = () => (
  <GradientScaleCutText text="Introducing" />
);
 
export const RemotionRoot = () => (
  <Composition
    id="GradientScaleCutText"
    component={GradientScaleCutTextScene}
    durationInFrames={36}
    fps={30}
    width={1280}
    height={720}
  />
);

Tuning The Cut

cutFrame changes the exact frame where the giant layer is replaced. The gradient reveal remains tied to the full component timeline, so it does not restart after the cut. settleTravel controls the compact entrance distance, anchorOffsetX sets its final position, and compactBlur controls focus.

<GradientScaleCutText
  text="Now shipping"
  cutFrame={13}
  giantTravel={400}
  settleTravel={160}
  compactBlur={12}
  gradientStart="#f04a14"
  gradientEnd="#f3f1f1"
/>

Props

PropTypeDefaultDescription
text
string"Introducing"Single-line text shared by both scale phases
giantFontSize
number520Font size before the hard cut
compactFontSize
number132Font size after the hard cut
fontWeight
number700Shared CSS font-weight
gradientStart
string"#f04a14"Color at the left edge of the revealed text
gradientEnd
string"#f3f1f1"Color across the right portion of the revealed text
ghostColor
string"#170b0a"Color of the text ahead of the reveal boundary
backgroundColor
string"#000000"Full-frame background color
anchorOffsetX
number-16Compact line offset from the frame center
giantTravel
number400Leftward travel before the cut
settleTravel
number160Compact entrance distance before it stops at the anchor
cutFrame
number13First frame that renders the compact layer
revealSoftness
number14Width of the soft mask boundary as a percentage of the text box
compactBlur
number12Starting blur after the cut in pixels
speed
number1Playback speed multiplier
className
stringOptional className passed to the full-frame root