Pinfield
A grid of pins that carries pulses — click and a wavefront travels outward, lighting the field.
Live — this one is real
Grid — 26px
Click the field — a pulse travels through the grid
Usage
import { Pinfield } from "mizu-ui";
export function Field() {
return <Pinfield gap={26} />;
}
Source & setup
Add this component to your project with the shadcn CLI. The command copies its source into your configured UI directory, with base.css, Mizu’s tokens, and the stylesheets that hold its rules. Each rule lives in one stylesheet, so components you add together never repeat CSS. In a project without a components.json, run npx shadcn@latest init 0xuser64bit/mizu/preset first: plain init installs shadcn’s theme into your global CSS. Then load the fonts.
npx shadcn@latest add 0xuser64bit/mizu/pinfieldEvery component imports from its own path, its name in kebab case. To paste the example, replace its mizu-ui import with:
import { Pinfield } from "@/components/ui/mizu/pinfield";For npm imports, import mizu-ui/styles.css once. Fonts are optional via mizu-ui/fonts.css. Override --mizu-* tokens or use className for local styling. Requires React and Motion. A Client Component: its source starts with “use client”.
Inspect lab/Pinfield.tsx
Source is included in the npm package under src/lab/Pinfield.tsx.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| gap | number | 26 | Grid spacing in px. |
| speed | number | 3.4 | Wavefront propagation speed. |
| autoPulse | boolean | true | Send an ambient pulse every 3s. |
Accessibility
Canvas carries button semantics with instructions. Focus the field and press Enter or Space to send a pulse.
Motion
DPR-scaled canvas with IntersectionObserver pausing, and a static frame under reduced motion.