Axis Flex

A gradient word flexes its width and weight like an elastic variable font, then snaps to a final style. A free, MIT-licensed Remotion text animation.

Installation
$ pnpm dlx shadcn@latest add @remocn/axis-flex

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { AxisFlex } from "@/components/remocn/axis-flex";
 
const AxisFlexScene = () => (
  <AxisFlex word="flexible" line="One font, every mood" accent="#3B5BFD" />
);
 
export const RemotionRoot = () => (
  <Composition
    id="AxisFlex"
    component={AxisFlexScene}
    durationInFrames={150}
    fps={30}
    width={1280}
    height={720}
  />
);

Each letter rides an equalizer wave between a light condensed cut and a wide medium cut, so the word breathes in width and weight. At frame 84 the letters snap one by one to the final style with a spring, then the narrow second line squeezes in underneath. Pass word and line; it ships light and dark through theme.

Props11

PropTypeDefault
word
string"elastic"

The word that flexes.

line
string"One family, every width"

Second line, set in the narrow cut under the word.

accent
string"#3B5BFD"

Accent color blended into the word's gradient fill.

background
string—

Background fill; pass "transparent" to drop it.

fontFamily
string"Mona Sans"

Typeface for the copy; it needs wdth and wght axes to flex. Load the font in your project first.

settleAt
number84

Frame the letters stop flexing and snap to their final cut; the second line follows.

stagger
number2

Frames between letters as they snap.

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""dark"

Ships light and dark.

speed
number1

Playback speed multiplier.

  • wordstring

    The word that flexes.

    Default"elastic"

  • linestring

    Second line, set in the narrow cut under the word.

    Default"One family, every width"

  • accentstring

    Accent color blended into the word's gradient fill.

    Default"#3B5BFD"

  • backgroundstring

    Background fill; pass "transparent" to drop it.

  • fontFamilystring

    Typeface for the copy; it needs wdth and wght axes to flex. Load the font in your project first.

    Default"Mona Sans"

  • settleAtnumber

    Frame the letters stop flexing and snap to their final cut; the second line follows.

    Default84

  • staggernumber

    Frames between letters as they snap.

    Default2

  • 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"dark"

  • speednumber

    Playback speed multiplier.

    Default1