RGB Glitch Text

Three RGB-offset text copies jitter for a few frames to create a chromatic aberration glitch

Installation

$ pnpm dlx shadcn@latest add @remocn/rgb-glitch-text

Usage

// src/Root.tsx
import { Composition } from "remotion";
import { RGBGlitchText } from "@/components/remocn/rgb-glitch-text";

const RGBGlitchTextScene = () => (
  <RGBGlitchText text="SYSTEM" glitchAt={20} glitchDuration={8} intensity={6} />
);

export const RemotionRoot = () => (
  <Composition
    id="RGBGlitchText"
    component={RGBGlitchTextScene}
    durationInFrames={90}
    fps={30}
    width={1280}
    height={720}
  />
);

Props

PropTypeDefaultDescription
textrequired
stringThe text to display and glitch
fontSize
number96Font size in pixels
color
string"#171717"Base text color (visible at all times)
fontWeight
number700CSS font-weight
glitchAt
number20Frame at which the glitch starts
glitchDuration
number8Duration of the glitch window in frames
intensity
number6Maximum offset (in pixels) for the RGB copies
seed
string"glitch"Seed used by `random()` so the jitter stays deterministic
speed
number1Playback speed multiplier (1 = normal, 2 = twice as fast)
className
stringOptional className passed to the inline-block wrapper