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.
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
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.
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.mdThe index of every part is at /llms.txt.