Controls

Comic Glitch Text

Loop
Preview
Reduced motion

Simulates prefers-reduced-motion for the demo. Off follows your system setting.

Keyboard stepping

Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.

Comic Glitch Text

And a lean, silent figure slowly fades into the gathering darkness, aware at last that in this world, with great power there must also come… great responsibility!

Comic Glitch Text

A paragraph that glitches in word by word through comic panels, torn color slices and print misregistration.

Installation

npx shadcn@latest add ikislay/pixel-ui/comic-glitch-text

How to use

import { ComicGlitchText } from "@/components/ui/comic-glitch-text"
export function Demo() {
return (
<ComicGlitchText className="max-w-md text-lg">
With great power there must also come great responsibility.
</ComicGlitchText>
)
}

Source Code

// Loading…

Props

Options you can pass to customize this component.

Prop
Type
Description
children*
string

The text to reveal. It wraps like a normal paragraph.

stagger
number

Frames between one word and the next, at 24 frames a second.

loop
truefalse

Scrambles the text out and plays the reveal again. Off, the text stays after the first reveal.