Skip to content
caliper ui pro docs

Halftone image

A photograph printed as a halftone screen: ink dots on a 45° grid whose size follows the picture's tone. The dots grow in on a diagonal when it first appears, and swell and part around the pointer like a loupe over newsprint.

Pro

Aoife Byrne

On building tools for slow work, p. 32

When to use

  • Portraits, covers and feature images on editorial and brand pages.
  • Pairing with the photograph itself, as the reveal lens demo does.

When not to use

  • Images people must judge accurately, such as product colour.
  • Very small thumbnails, where the screen turns to noise.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/halftone-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

HalftoneImage

4 props

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

PropTypeDefaultDescription
src *string—
alt *string—What the picture shows.
cellnumber9Screen pitch in px: the distance between dot centres along a row.
reachnumber96How far the pointer's loupe reaches, in px.

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/halftone-image.md

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

More in Media