Task path / input to outcome
How to create a CSS text glitch effect
- 01
Type the preview text
Enter 1–32 characters in Preview text — the counter beside the label tracks the length. Short, wide words read best once the layers start splitting.
- 02
Set the three colors
Text color paints the base layer, while Cyan channel and Red channel are the offset replicas that produce the chromatic fringe. Channels near pure cyan and red give the classic chromatic look; muted channels produce a subtler, more modern split.
- 03
Tune the glitch motion
Layer offset (1–12 px) sets how far the replicas drift, and Cycle duration (0.2–3 s) sets the loop speed. The preview stages all three layers live.
- 04
Understand the three layers
The base element keeps your Text color, while the cyan replica is clipped to the top of the line and the red one to the bottom. Each replica runs a steps(2, end) animation — hard jumps instead of smooth slides — which is what makes the glitch feel like signal interference.
- 05
Copy the glitch CSS
Press Copy CSS or Download .css to save toolars-text-glitch.css. A prefers-reduced-motion block ships in the export and keeps a static fringe for motion-sensitive visitors. The output panel shows the live byte count, and both actions stay disabled while the text fails validation.
- 06
Add the data-text attribute
The replicas read their content from attr(data-text), so your element needs a data-text attribute identical to its visible text. When the copy changes later, update both — the attribute is what the cyan and red layers actually paint. The attribute lives on the same element as the class, so the whole effect stays one tag.