v0.0.1

AsciiImage

Turns an image into ASCII art: pixels map to sparser or denser characters by brightness, in a single color or the original colors. Decodes top to bottom on viewport entry, then a glint sweeps across and characters flicker; near the pointer they are pushed aside, brightened and scrambled. Adapts to light and dark themes.

Customize

Text color

Props

PropTypeDefaultDescription
srcstring—Image URL. Cross-origin images need CORS so pixels can be read; otherwise the original image is shown instead
altstring—Alternative text for screen readers
columnsnumber100Characters per row; higher means more detail
charactersstring' .:-=+*#%@'Character ramp ordered from sparse to dense
coloredbooleanfalseColor each character with its source pixel
colorstringcurrentColorCharacter color in single-color mode, inherits the text color; also overridable via --elyri-ascii-color
invertbooleanfalseInvert the brightness mapping (by default bright areas are dense in dark themes and dark areas are dense in light themes)
animatedbooleantrueDecode from top to bottom on viewport entry
durationnumber1200Reveal duration in milliseconds
shimmerbooleantrueSweep a diagonal glint across the image periodically
flickernumber0.01Fraction of characters that randomly flicker each frame (0-1), 0 disables it
interactivebooleantruePush aside, brighten and scramble characters near the pointer
radiusnumber90Pointer influence radius in CSS pixels
classNamestring—Extra class name

Dependencies

Canvas 2DIntersectionObserverResizeObserver