Kinetic Warp

A coarse mesh warp bends a whole word in staccato beats, one axis moving per keyframe

Installation

$ pnpm dlx shadcn@latest add @remocn/kinetic-warp

Usage

// src/Root.tsx
import { Composition } from "remotion";
import { KineticWarp } from "@/components/remocn/kinetic-warp";
 
const KineticWarpScene = () => (
  <KineticWarp
    text={"REM\nOCN"}
    fontFamily="Passion One"
    fontUrl="https://fonts.googleapis.com/css2?family=Passion+One:wght@700&display=block"
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="KineticWarp"
    component={KineticWarpScene}
    durationInFrames={120}
    fps={30}
    width={1920}
    height={1080}
  />
);

The component renders to a canvas, so the font must actually be loaded before the text is drawn — pass fontUrl for any webfont and the render is held (via delayRender) until it lands.

Props

PropTypeDefaultDescription
text
string"REM\nOCN"The text to warp. Split lines with `\n`
textColor
string"#FFFFFF"Fill color of the type
fontFamily
string"sans-serif"Font family drawn to the canvas
fontUrl
string""Stylesheet URL for the webfont. Empty string skips loading and uses a local font
fontWeight
number700CSS font-weight
fontSize
number107.1Layer-space font size, before `layerScale`
leading
number70Layer-space baseline-to-baseline distance, before `layerScale`
tracking
number-21Tracking in 1/1000 em
layerScale
number480Percent scale applied to the type after layout
positionX
number960Horizontal center of the text block in comp pixels
positionY
number540Vertical center of the text block in comp pixels
compWidth
number1920Canvas width in pixels
compHeight
number1080Canvas height in pixels
meshRows
number2Mesh cells vertically — the coarseness is the effect
meshColumns
number4Mesh cells horizontally
colRestX
number960Rest position of the moving column line
colRightX
number1255Column position at keyframes 2 and 3
colLeftX
number678Column position at keyframes 4 and 5
rowRestY
number540Rest position of the moving row line
rowDownY
number850Row position at keyframes 3 and 4
rowUpY
number387Row position at keyframe 5
keyframeStride
number20Frames between the six keyframes — motion ends at `5 * keyframeStride`
easingBezier
[number, number, number, number][0.3, 0.74, 0.09, 1]Cubic bezier applied between keyframes
resampleStep
number4Destination pixels per resampled strip — lower is smoother and slower
className
stringOptional className passed to the wrapper

Inspired by How to Make Kinetic Warp Text Animation in After Effects by P A N T E R.