Platform
VaultVault
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
ButtonsPart of ProButtons
IconsPart of ProIcons
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
SavedPart of ProSaved
Support
DocumentationDocumentation
MCP serverMCP server
SettingsSettings
VaultGallery & imagesASCII Image
Horizontal Word SliderBrowse all 182Arc Collage Hero
  • Free15
  • Navigation19
  • Buttons9
  • Scroll55
  • Text27
  • Sliders & marquees19
  • Gallery & images67
  • Cursor24
  • Page transitions10
  • Loaders2
  • Backgrounds10
  • UI components33
  • Interface Essentials144
  • Social Icons69
  • Payment Badges41
Sign inSign in

Start free. The code for 15 components, no card needed.

Get 15 free

ASCII Image

This one is locked. Become a member to open the code for it and the rest of the Vault.

See plansTry the 15 free ones

What you'll need.

Install

  • gsap

Setup

npm i gsap

More like this

  • Reveal
  • ASCII
  • Canvas
  • WebGL

Features.

  • Redraws any picture as a grid of characters, picked by the brightness underneath each cell
  • Cells stay the same size on every screen, so a bigger window shows more detail, not bigger type
  • Types itself in from a point you choose: a soft, glowing front with the two-tone a beat behind
  • Two-tone render by default; a click sweeps to the picture's own colours and a second click sweeps back
  • With a depth map the near parts are lit and the far parts dimmed in colour mode, so the subject comes forward
  • Pointer parallax on the picture's near parts (with a depth map), on the whole section, or both, with separate X and Y travel
  • Transparent PNGs keep their cut-out shape
  • Auto levels and local contrast so most photos read without tuning
  • WebGL2 and GSAP only — no three.js, no build step
  • Draws only while something moves; an idle stage costs nothing
  • Respects prefers-reduced-motion; falls back to the plain picture without WebGL2

How to get it right.

Start with the silhouette

Leave auto levels on and raise data-au-levels-floor until the shadows go empty and the shape reads. Dark or flat pictures otherwise collapse onto two or three characters.

Get a depth map

A depth map turns this from a texture into an object. Any greyscale image at the picture's aspect works — white near, black far. Generate one with Depth Anything in the browser or Depth Pro locally, then spend a minute painting the parts you want forward. data-au-depth="auto" is a reasonable stand-in for backlit or simple shots.

Pick a cell size for the stage

8px suits a full-bleed hero on desktop. Go to 10–12 for busier pictures or lower-powered devices, 6 for a fine, photographic look. Mobile GPUs prefer 10 or more.

Tune the ramp to the mood

The default ramp is balanced. Fewer characters (" .:+#@") give a bolder, poster feel; more give smoother tone. Keep the space first so shadows stay blank.

Give the reveal room

3.5 seconds reads as deliberate on a hero; 1.5–2 is right for something further down a page. Randomness near 0 makes a clean wipe from the origin, near 1 a scatter.

Variations.

  • Duotone — the default: highlight on shadow tone, click for colour
  • Full colour — set data-au-click="false" and change color / color-dark to taste for a single-tone hold, or trigger the colour sweep yourself from window.au.AsciiImage
  • Flat poster — a short ramp, data-au-brightness="1", data-au-local-contrast="0"
  • Fine print — data-au-cell-size="6", the full default ramp, data-au-randomness="0.9"
  • Still — data-au-parallax-x="0", data-au-parallax-y="0", data-au-reveal-duration="0.2" for a near-instant appearance

Where it fits.

  • Hero image for a product or studio page — the picture arrives as text and resolves into itself
  • Case study opener — a cut-out of the product with a depth map and parallax
  • Portrait in an about section — the subject on a quiet, coarse background via depth focus
  • 404 / interstitial — a bold, short-ramp render with click-to-colour as the one interaction

Frequently asked.

The picture didn't load, usually CORS: a cross-origin image must be served with Access-Control-Allow-Origin. Same-origin paths always work.

Raise data-au-levels-floor for more contrast in the shadows; lower data-au-brightness to pull the midtones down. If only the two-tone feels harsh, lower data-au-tone-brightness (or warm data-au-color) and leave the colour view alone.

Yes — override --asi-bg on the stage and set data-au-color / data-au-color-dark. Everything else inherits from your page.

Yes — data-au-parallax-target="container" moves the stage's parent element (the hero), both moves the parent and the picture's near parts. data-au-parallax-x / -y set the travel in % of that element; give the parent's own parent overflow: hidden if their backgrounds differ.

No. Load gsap before the script; nothing else is needed.

Related components.

Pro

File Drawer Cards

Hover

Pro

Capsule Image Hero

Click

Pro

Depth Fly-Through Hero

Load