Interaction Lab

Features

  • Gray-Scott labyrinth on a 130 × 110 grid in halftone dots
  • Move through it to paint fresh chemical; press for a wider brush
  • Fresh paint is blue and fades back to ink as the pattern absorbs it
  • A bead of blue sits under a resting pointer
  • Warms up progressively so the page never janks

API reference

<ReactionDiffusion /> from components/aiforui/reaction-diffusion.tsx

PropTypeDefaultDescription
feednumber0.037Feed rate F. Around 0.03 breaks into spots.
killnumber0.06Kill rate k.
brushnumber4Brush radius in grid cells.
speednumber8Simulation steps per frame.

Keyboard interactions

TabFocuses the exhibit. Blue corner brackets show it has focus.
← → ↑ ↓Moves the blue probe 12px. It stands in for the pointer.
Shift + arrowsMoves the probe 48px.
Space (hold)Paints with the wider brush at the probe.
EnterTaps at the probe.
EscapeLets go and hides the probe.

Accessibility

  • The tile is a focusable role="group" with aria-roledescription "interactive demo" and a label that says what it shows and how to drive it.
  • The canvas and the SVG overlay are aria-hidden. A polite live region reads the live stats about 0.7s after keyboard input settles.
  • With prefers-reduced-motion, frames only run while the pointer is inside or for about 3 seconds after input, so the pattern evolves only while you paint; it is fully grown on mount.
  • The animation loop pauses while the tile is offscreen or the tab is hidden.
  • Focus is shown with corner brackets on :focus-visible only, so mouse clicks do not leave a ring.

Sound & haptics

Silent. It plays no sound and triggers no haptics.

Files

Written from scratch for sher.md and inspired by the Interaction Lab on aiforui.dev. It is an original build: it contains none of aiforui.dev's code, styles, assets or sounds, and its text is our own.