Glitch Text

Interactive canvas-based text with sticky glitch effect that responds to cursor movement

glitch-text-tw

Customize

Text & Colors

#000000
#00ffff
#ff00ff
#0008ff

Typography

80
-3
1.5

Interaction & Options

250

Props

textstring

Text to display. Use ' | ' to split text into multiple lines.

Default:"Glitch Text"
classNamestring

Additional CSS classes for the container.

Default:""
colorsstring[]

Array of hex color strings for the glitch effect layers.

Default:["#00ffff", "#ff00ff", "#ffff00"]
textColorstring

Main text color displayed on top. Defaults to black in light mode, white in dark mode.

Default:undefined
fontSizenumber

Font size in pixels.

Default:80
fontWeightstring

Font weight (normal, bold, etc.).

Default:"600"
radiusnumber

Interaction radius in pixels. Characters within this distance from the cursor will react.

Default:250
letterSpacingnumber

Additional spacing between characters in pixels.

Default:-1
lineHeightnumber

Line height multiplier for multi-line text.

Default:1.5
textAlign"left" | "center" | "right"

Horizontal text alignment.

Default:"center"
fadeInboolean

Enable fade-in animation for letters on load.

Default:false
autoFitboolean

Automatically scale font size to fit the container width.

Default:true