Skip to content
caliper ui pro docs

Ascii image

A photograph typed out in characters. It resolves left to right out of flickering glyphs the first time it scrolls into view, and the type under the pointer churns like static, then settles once the pointer moves on.

Pro

Above the cloud line, 06:40

When to use

  • Editorial and developer-facing pages where a photo should carry the voice of a terminal or a zine.
  • Covers, issue headers and 404s that want a picture without a polished photo's weight.

When not to use

  • Photos people need to see in detail, such as products or faces in a directory.
  • Small sizes; under about 40 columns the picture is lost.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/ascii-image

Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

AsciiImage

4 props

Also accepts the native props of its root element and a ref.

PropTypeDefaultDescription
src *string—
alt *string—What the picture shows; read instead of the characters.
cellnumber7Character width in px. Smaller is finer and costs more.
charsetstring" .,:;-=+*#%@"Glyphs from no ink to most ink.

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It exposes img semantics, with aria-label and aria-hidden kept in step with state.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/ascii-image.md

The index of every part is at /llms.txt.

More in Media