FX · Backgrounds

Print-style halftone dots with a band of large dots sweeping across.

Print shop

bash
npx shadcn@latest add https://www.rad-ui.com/r/halftone.json
React
import Halftone from "@/components/fx/halftone" <Halftone className="px-8 py-24"> <h2>Your content</h2> </Halftone>
  • The effect layer is aria-hidden and ignores pointer events; only children are exposed.
  • Pauses offscreen; `paused` stops it on demand (wire it to a visible control if it runs behind reading content).
  • prefers-reduced-motion: reduce (or data-rad-fx-motion="reduce" on an ancestor) parks the band in the middle.
PropTypeDefaultDescription
color
string
pink, 55%

Dot colour.

spacing
number
14

Dot spacing in px.

speed
number
8

Seconds for the band to cross.

paused
boolean
false

Stop the animation. It also pauses offscreen.

...props
ComponentProps<'div'>
—

Passed to the root div; children render above.