Skip to content

pastetaste

Pointer Halftone Photo

MediaCanvasInteraction

A photograph redrawn as round dots on a canvas, sized by brightness, growing in as a diagonal wave and swelling near the mouse. Redraws only on change and pauses off-screen.

Paste it into Claude Code: it installs the component, asks for your brand and content, and places it on the page you name.

Install

Or by hand, in a Next.js project with shadcn set up. It writes components/pastetaste/pointer-halftone-photo.tsx.

npx shadcn@latest add https://pastetaste.com/r/pointer-halftone-photo.json

Prompt

Install the pastetaste component "Pointer Halftone Photo" (pointer-halftone-photo) into this Next.js project and use it.

What it is: A photograph redrawn as round dots on a canvas, sized by brightness, growing in as a diagonal wave and swelling near the mouse. Redraws only on change and pauses off-screen.

Before you place it, ask me (one short message, in my language; "skip" = sensible default): which page and section it goes in, my brand colour (hex), the text, labels or images it should show, and whether I want my logo or my own copy in the demo content. Then:

Steps:
1. If the project has no components.json, run: npx shadcn@latest init -y -d. Then run: npx shadcn@latest add https://pastetaste.com/r/pointer-halftone-photo.json
   (it writes components/pastetaste/pointer-halftone-photo.tsx; install any npm packages it reports).
2. Import it: import { PointerHalftonePhoto } from "@/components/pastetaste/pointer-halftone-photo" (check the file for the exact named export).
3. Put it where it fits on the page I name, keep the rest of the page untouched, and pass props for my colours instead of editing the installed file.
4. It does not depend on Tailwind; colours come from CSS variables (--pt-*) or props.
5. It supports prefers-reduced-motion with a still state; do not remove it.

Props (all optional unless the type has no default):
- src: string = '/p/modra/flower-peony.jpg' — Photo to convert; same-origin or CORS-enabled.
- alt: string = 'Halftone dots forming a peony' — Accessible description of the canvas.
- color: string = '#e0261c' — Dot colour.
- background: string = '#060606' — Canvas background.
- cell: number = 7 — Grid cell in px (6 or less on screens under 500 px).
- gain: number = 3.2 — Brightness multiplier before the dot size; higher = more dots.
- swell: number = 120 — Radius of the mouse swell in px; 0 turns it off.
- focusY: number = 0.35 — Vertical position of the crop, 0 top to 1 bottom.
- aspect: string = '4 / 5' — Aspect ratio of the box.
- className / style: string / CSSProperties — On the box.

Live preview: https://pastetaste.com/c/pointer-halftone-photo
Then run the dev server, check it in the browser at desktop and mobile width, and tell me the page URL.

Props 10

PropTypeDefaultDescription
srcstring'/p/modra/flower-peony.jpg'Photo to convert; same-origin or CORS-enabled.
altstring'Halftone dots forming a peony'Accessible description of the canvas.
colorstring'#e0261c'Dot colour.
backgroundstring'#060606'Canvas background.
cellnumber7Grid cell in px (6 or less on screens under 500 px).
gainnumber3.2Brightness multiplier before the dot size; higher = more dots.
swellnumber120Radius of the mouse swell in px; 0 turns it off.
focusYnumber0.35Vertical position of the crop, 0 top to 1 bottom.
aspectstring'4 / 5'Aspect ratio of the box.
className / stylestring / CSSProperties-On the box.
View all →