Skip to content
Knowns UI
Get ProSign in

Pixel Wave

Changes a card from one state to the next through a wave of coloured dots that starts where the person pressed. Give it a view key; when the key changes, the old state breaks up into dots as the new one forms behind them, in 720ms. Reduced motion crossfades.

On this page
Used for
  • Pay to Paid
  • Run to Passed
  • Publish to Live
  • Join to You're in
  • Any card that changes state

Examples

Tone
Dot

One row, one press

The wave starts at the button, so a small row reads as answering it. The key is all it needs: the row keeps its own layout in both states.

Installation

npx knowns-ui@latest add pixel-wave
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

view
string
The key of the view on show. A new key plays the wave from the old view to children.
children
ReactNode
The current view. Keep the state you want to see during the wave in it: the old copy is the same instance, frozen and inert.
tone
"accent" | "success" | "spectrum" | [light, mid, deep]
Default"accent"
The dots' colours: the theme accent, the paid or done greens, a warm to cool sweep, or three CSS colours or variables.
origin
"press" | "center" | { x, y }
Default"press"
Where the wave starts: the last press inside (the focused control for Enter or Space), the centre, or a point in px.
cell
number
Default6
Dot pitch in px, 4 to 12.
disabled
boolean
Defaultfalse
Swap at once, with no wave and no fade.
onSettled
(view) => void
Called with the old key once it is gone.

Accessibility

  • The new view is in the page at once. If focus was inside the old view, it moves to the new one: to an element marked data-autofocus, else the view itself.
  • The old copy is inert and aria-hidden while it leaves, so it cannot be clicked, tabbed to or read.
  • The wave is decoration on a canvas marked aria-hidden. Announce the change itself (Payment received) in your own live region.
  • Reduced motion: a 120ms crossfade with no dots.

What it handles

  1. 01Keeps the old view on screen, as the same live instance, while the new one forms: typed fields, a spinner and scroll stay as they were.
  2. 02Starts the wave where the person pressed, or at the focused control when they used Enter or Space, so the change reads as the answer to that press.
  3. 03Breaks the old view up into a ring of dithered dots, solid at the seam and loose behind it, in a tone or three colours of your own.
  4. 04Makes the new view live at once: it takes focus if focus was in the old one, and the old copy is inert and hidden from screen readers.
  5. 05Holds the taller of the two heights for the moment, so nothing under the card jumps while it changes.
  6. 06Plays nothing on first render or when the key stays the same, and crossfades instead under reduced motion.

States

First render
Nothing. The view paints as it is
none
Burst
The pressed spot turns to dots
120ms, ease out
Sweep
The ring crosses the card; old view ahead, new view behind
420ms, ease in-out
Settle
The last loose dots fade
180ms, ease out
Same key
Nothing moves
none
Reduced motion
The two views crossfade, no dots
120ms, ease out

Works with

When to use

When to use

  • A rare state change on a card that answers a press: Pay to Paid, Run to Passed, Publish to Live.
  • Turning a form card into its result without a page change.

When not to use

  • Frequent changes such as a status tick or a row refresh: they should not move: use Status Dot.
  • Opening and closing a region: use Accordion.

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Pixel Wave to my app and wire it to my own data.
  • I need a rare state change on a card that answers a press: Pay to Paid, Run to Passed, Publish to Live. Set that up with the Knowns UI Pixel Wave.
  • Which Pixel Wave props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "pixel-wave" }) and search_docs({ query: "pixel wave" }).

Need help?

Stuck on Pixel Wave, or found something off? We read every message.