Gradient Scale Cut Text
An oversized gradient reveal snaps to a compact blurred line that settles into focus
$ pnpm dlx shadcn@latest add @remocn/gradient-scale-cut-textUsage
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"
/>Props16
| Prop | Type | Default |
|---|---|---|
| text | string"Introducing" Single-line text shared by both scale phases | |
| giantFontSize | number520 Font size before the hard cut | |
| compactFontSize | number132 Font size after the hard cut | |
| fontWeight | number700 Shared 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-16 Compact line offset from the frame center | |
| giantTravel | number400 Leftward travel before the cut | |
| settleTravel | number160 Compact entrance distance before it stops at the anchor | |
| cutFrame | number13 First frame that renders the compact layer | |
| revealSoftness | number14 Width of the soft mask boundary as a percentage of the text box | |
| compactBlur | number12 Starting blur after the cut in pixels | |
| speed | number1 Playback speed multiplier | |
| className | string— Optional className passed to the full-frame root | |
- textstring
Single-line text shared by both scale phases
Default
"Introducing" - giantFontSizenumber
Font size before the hard cut
Default
520 - compactFontSizenumber
Font size after the hard cut
Default
132 - fontWeightnumber
Shared CSS font-weight
Default
700 - gradientStartstring
Color at the left edge of the revealed text
Default
"#f04a14" - gradientEndstring
Color across the right portion of the revealed text
Default
"#f3f1f1" - ghostColorstring
Color of the text ahead of the reveal boundary
Default
"#170b0a" - backgroundColorstring
Full-frame background color
Default
"#000000" - anchorOffsetXnumber
Compact line offset from the frame center
Default
-16 - giantTravelnumber
Leftward travel before the cut
Default
400 - settleTravelnumber
Compact entrance distance before it stops at the anchor
Default
160 - cutFramenumber
First frame that renders the compact layer
Default
13 - revealSoftnessnumber
Width of the soft mask boundary as a percentage of the text box
Default
14 - compactBlurnumber
Starting blur after the cut in pixels
Default
12 - speednumber
Playback speed multiplier
Default
1 - classNamestring
Optional className passed to the full-frame root