Caret Letter

Blinking text cursor types a brand name with one letter missing, slides into the gap and turns into that letter. A typewriter-caret logo reveal for intros. A free, MIT-licensed Remotion text animation.

In Remotion, Caret Letter animates a blinking text cursor that types out a brand name with one letter missing, then slides into the gap and turns into that missing letter. Use it for a product-name or wordmark reveal at the start of a launch video, with a short descriptive line fading in underneath.

Installation
$ pnpm dlx shadcn@latest add @remocn/caret-letter

How to build this in Remotion

No need to build a typewriter, measure the word with measureText and morph the caret by hand. Install the component and pass the word:

bash
npx shadcn@latest add @remocn/caret-letter

The schedule in timeline.ts gives the caret, the typing, the slide, the letters parting and the morph fixed start frames; each step is an interpolate() with an Easing curve, clamped. Letter positions are measured from the loaded font on a canvas before the first frame (held with delayRender / continueRender), so the gap opens exactly where the missing letter belongs. @remotion/layout-utils is not needed.

Good to know

  • Length: 180 frames of motion at 30 fps (360 at 60 fps) with the default props. The demo composition plays 225 frames, which adds a hold. Timing is fixed: a longer composition holds the final frame. The Usage example below is a 60 fps composition, so the numbers it hands to Remotion are doubled, see Frame rate.
  • Installs: remotion, @remotion/google-fonts from npm, plus the remocn helpers glide, frame-rate, timeline. The shadcn CLI copies the source into your project.
  • Font: loads Inter Tight itself through @remotion/google-fonts. Pass fontFamily to use your own face, and load that font in your project.
  • The caret becomes a solid accent-colored bar sized to the ink box of the letter at stemIndex. That reads as the letter only for straight stems such as l, I, i without its dot or 1; a round letter like o would end as a rectangle.
  • The subline always renders under the word; pass subline="" to leave it empty.
  • Default accent is #3B5BFD, and the scene defaults to the light theme.

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { CaretLetter } from "@/components/remocn/caret-letter";
 
const CaretLetterScene = () => (
  <CaretLetter
    word="launch"
    stemIndex={0}
    subline="Ship the demo video in an afternoon."
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="CaretLetter"
    component={CaretLetterScene}
    durationInFrames={450}
    fps={60}
    width={1280}
    height={720}
  />
);

A caret blinks in and types the word except for one letter, slides over to that spot, the word opens to make room, and the caret morphs into the letter, then a grey subline fades in. Pass word and stemIndex (the letter the caret turns into; pick a plain stem such as l, I or 1), plus subline and accent. It ships light and dark through theme, defaulting to light.

Props13

PropTypeDefault
word
string"launch"

The word; the caret types every letter except the stem.

stemIndex
number0

Index of the letter the caret becomes; pick a plain stem such as l or I.

subline
string"Animated components for your next release."

Small grey line under the word.

accent
string"#3B5BFD"

Color of the caret and of the letter it becomes.

ink
string—

Text color; overrides the theme ink.

background
string—

Background fill; pass "transparent" to drop it.

fontFamily
string"Inter Tight"

Typeface for the copy. Inter Tight loads by default; load any other face in your project first.

fontWeight
number300

Weight of the word.

typeLength
number46

Frames the caret takes to type the word; the later beats shift with it.

scale
number1

Size of the foreground around the frame's center; the background stays put.

delay
number0

Frames to hold the first frame before anything moves.

theme
"dark" | "light""light"

Ships light and dark.

speed
number1

Playback speed multiplier.

  • wordstring

    The word; the caret types every letter except the stem.

    Default"launch"

  • stemIndexnumber

    Index of the letter the caret becomes; pick a plain stem such as l or I.

    Default0

  • sublinestring

    Small grey line under the word.

    Default"Animated components for your next release."

  • accentstring

    Color of the caret and of the letter it becomes.

    Default"#3B5BFD"

  • inkstring

    Text color; overrides the theme ink.

  • backgroundstring

    Background fill; pass "transparent" to drop it.

  • fontFamilystring

    Typeface for the copy. Inter Tight loads by default; load any other face in your project first.

    Default"Inter Tight"

  • fontWeightnumber

    Weight of the word.

    Default300

  • typeLengthnumber

    Frames the caret takes to type the word; the later beats shift with it.

    Default46

  • scalenumber

    Size of the foreground around the frame's center; the background stays put.

    Default1

  • delaynumber

    Frames to hold the first frame before anything moves.

    Default0

  • theme"dark" | "light"

    Ships light and dark.

    Default"light"

  • speednumber

    Playback speed multiplier.

    Default1

Common questions

How do I animate a blinking cursor that types a brand name and turns into the missing letter?

Install Caret Letter with npx shadcn@latest add @remocn/caret-letter, pass the name as word and the index of the missing letter as stemIndex. The caret types the rest, slides over and becomes that letter.

Does the morph work for rounded letters?

Not well. The caret morphs into a rectangle the size of the letter's ink box, so pick a straight stem: l, I, i or 1.

Can I hide the line under the word?

Yes, pass an empty subline.

  • Typewriter: a typed line with no morph.
  • Caret Swap: the caret eats one phrase and types another.
  • Caret Wipe: a caret that wipes content on or off.
  • Letter Relay: a wordmark where letters hop in one after another.