Outline Fill Track Text
A rising lead word gives way to an outlined value that fills as one continuous track moves left
$ pnpm dlx shadcn@latest add @remocn/outline-fill-track-textUsage
OutlineFillTrackText places the lead and value on one measured horizontal
track. The lead rises through a soft violet-black field, holds briefly, then
the whole track travels left. The value enters as a thin outline while a
separate filled duplicate is uncovered from left to right. Neither text layer
animates its opacity.
The track begins moving slowly as the lead settles. At frame 34 the value is
cut into view with the fill already crossing the 1, matching the abrupt handoff
in the reference instead of exposing a stray piece of outline at the frame edge.
The default 80-frame cycle ends on the large filled value. It deliberately does not include an exit, so the result can hold for the remainder of a scene or cut directly into the next composition.
// src/Root.tsx
import { Composition } from "remotion";
import { OutlineFillTrackText } from "@/components/remocn/outline-fill-track-text";
const OutlineFillTrackTextScene = () => (
<OutlineFillTrackText leadText="Keep" valueText="100%" />
);
export const RemotionRoot = () => (
<Composition
id="OutlineFillTrackText"
component={OutlineFillTrackTextScene}
durationInFrames={80}
fps={30}
width={1280}
height={720}
/>
);Controlling The Track
With trackDistance={0}, the component measures both strings and derives the
distance between their centers. wordGap controls the actual empty space
between their glyph boxes. A value that fits the composition stops on the
measured anchor. When it is wider than the available frame, the component adds
the exact overflow to the camera travel and leaves its trailing edge at
endPadding instead of stopping in the middle of the string.
Set a positive trackDistance to override the center-to-center distance. The
long-value overflow is still applied, so the camera continues through the final
visible glyphs. The track uses a symmetric ease-in-out curve: it accelerates
from rest, carries speed through the middle, and decelerates into the hold.
<OutlineFillTrackText
leadText="Save"
valueText="42%"
wordGap={180}
endPadding={96}
outlineWidth={3}
fillDuration={38}
glowColor="#64109a"
/>Props17
| Prop | Type | Default |
|---|---|---|
| leadText | string"Keep" Lead copy shown at the beginning of the track | |
| valueText | string"1000000000%" Outlined value that becomes the final filled text | |
| fontSize | number368 Shared font size in pixels | |
| fontWeight | number700 Shared CSS font-weight | |
| color | string"#f4f3f6" Lead and value fill color | |
| outlineColor | string"#e6e2ed" Value outline color | |
| outlineWidth | number3 Value outline width in pixels | |
| backgroundColor | string"#030012" Full-frame background color | |
| glowColor | string"#64109a" Diffuse color above the entering lead word | |
| enterOffset | number240 Lead word starting offset below its resting position | |
| trackDistance | number0 Fixed horizontal travel; zero derives it from measured text | |
| anchorOffsetX | number-84 Shared horizontal offset for the lead and final value anchors | |
| wordGap | number220 Gap between lead and value when travel is measured | |
| endPadding | number96 Right-side padding where an overflowing value stops | |
| fillDuration | number38 Duration of the left-to-right fill in frames | |
| speed | number1 Playback speed multiplier | |
| className | string— Optional className passed to the full-frame root | |
- leadTextstring
Lead copy shown at the beginning of the track
Default
"Keep" - valueTextstring
Outlined value that becomes the final filled text
Default
"1000000000%" - fontSizenumber
Shared font size in pixels
Default
368 - fontWeightnumber
Shared CSS font-weight
Default
700 - colorstring
Lead and value fill color
Default
"#f4f3f6" - outlineColorstring
Value outline color
Default
"#e6e2ed" - outlineWidthnumber
Value outline width in pixels
Default
3 - backgroundColorstring
Full-frame background color
Default
"#030012" - glowColorstring
Diffuse color above the entering lead word
Default
"#64109a" - enterOffsetnumber
Lead word starting offset below its resting position
Default
240 - trackDistancenumber
Fixed horizontal travel; zero derives it from measured text
Default
0 - anchorOffsetXnumber
Shared horizontal offset for the lead and final value anchors
Default
-84 - wordGapnumber
Gap between lead and value when travel is measured
Default
220 - endPaddingnumber
Right-side padding where an overflowing value stops
Default
96 - fillDurationnumber
Duration of the left-to-right fill in frames
Default
38 - speednumber
Playback speed multiplier
Default
1 - classNamestring
Optional className passed to the full-frame root