Halftone Dots

A React component in Beamline's Motion & effects category.

A picture rebuilt as a field of dots whose size follows brightness; a new picture morphs the dots, a click ripples through, the pointer pushes dots aside.

Use it for

  • A signature visual for an empty state, onboarding step or feature intro.
  • A profile or brand header where a photo should read as part of the interface.

Not for

Anatomy

  • field (role img, labelled; 320px square by default, shrinks with its room and stays square)
  • canvas
  • unlit grid
  • lit dots (vertical gradient)
  • viewfinder corners (optional)

States

  • loading (grid only)
  • resting
  • morphing to a new picture
  • ripple (a mouse press at once; on touch a tap, never a scroll)
  • pointer displacement (a hovering mouse; a finger on it scrolls the page, as on any picture)
  • paused (off screen or hidden tab)
  • narrower room (the field shrinks, resamples to the dots that fit and grows the new grid's dots in; a resize that keeps the grid only redraws)

Keyboard

  • Not focusable: it is a picture. Put controls that change it (segmented control) next to it.

Motion

Dots ease to their new size (time constant 120 ms at the default speed, scaled with --pui-duration-standard) so pictures flow into each other; a click sends a ring outward at 520 px/s that swells the dots it passes; dots within 70 px of the pointer lean away up to 12 px. The canvas draws only while something moves. Reduced motion: pictures swap at once, no ripple or displacement.

Props

PropTypeDefaultDescription
style / refCSSProperties / native Ref—style: Inline styles on the documented visual root; no overrides by default. ref: Receives the documented native target or imperative handle; omitted by default.
classNamesHalftoneDotsClassNames—Classes for the named visual parts; no overrides by default.
src (required)string—The picture to rebuild in dots (same-origin or CORS-enabled). Changing it morphs the dots into the new picture.
alt (required)string—Accessible description of the picture.
gradient[string, string]—Colours the lit dots run through, top to bottom. Defaults to the brand hue turning toward pink.
backdropstring—Colour of the unlit grid behind the picture.
cellnumber—Grid pitch in px: smaller is finer and costs more.
displaceboolean—Dots lean away from the pointer.
marksboolean—Corner marks in the accent, like a viewfinder.
invertboolean—Invert brightness: dark parts of the picture become the big dots (for pictures on a light ground).

Import

import { HalftoneDots } from "@beamline/halftone-dots";

Get it

Halftone Dots is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent

More in Motion & effects

  • Light band: A band of split light in the dark behind a section, blue at one end and amber at the other with a bright core: Prism's light at a chosen place, a hero…
  • Glow: Ambient light around one element that says something is happening: an aurora under a working composer, or a ring of light round a live card.
  • Liquid gooey: Liquid surfaces that merge like goo when they touch — split plus-menus, gooey switches, file chips.
  • Sound: Opt-in interface cues with scoped volume, graceful mute and bounded repetition; soft tactile gestures and restrained result tones.

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.