Skip to content
English
Scatter grid comes with Pro. Its preview shows once you unlock it.

How it works

Cells never move; only the icon tiles inside them are transformed, so the layout never changes. When the pointer enters the card, the component reads the cell centres once and sends every icon outward from the middle of the grid, leaning away from the pointer and bent by its own swerve, and further the closer it is to the pointer (up to 1.25×); each also has its own spin (40–150°, either way), scale and a delay of up to 50ms. Flights are eased in against the room they have, so the icons spread sideways to just inside the card but only a few pixels above and below the grid, and the title and text stay readable. While the pointer moves it re-aims after every 14px, so the icons keep drifting away. Leaving takes a 560ms ease-out; coming home takes 1s on a spring written as linear() from a damped spring (16% overshoot), with the token overshoot curve where linear() is not supported. While they are away, dashed sockets show where each belongs, and the flying tiles lift onto the surface with a shadow.

Use it for

  • Feature cards on a landing page: what a plan or kit includes.
  • Integration or tool overviews where a playful moment invites a closer look.
  • Empty states and onboarding cards that should feel alive.

Look elsewhere when

  • Grids where each icon is its own action (an app launcher, a toolbar): the icons run away from the pointer.
  • Dense dashboards: several moving cards at once become noise.
  • Icons that must be read precisely, such as status indicators.

Usage

import { ScatterGrid } from './ScatterGrid.jsx'

export function KitCard({ tools }) {
  return (
    <ScatterGrid
      title="Your trip kit"
      description="Tickets, stays, maps and phrases, all saved for offline use."
      items={tools.map((tool) => ({ key: tool.id, label: tool.name, icon: <tool.Icon /> }))}
    />
  )
}

Props

PropTypeDefaultWhat it does
items{ key?: string | number, label: string, icon: ReactNode }[]—The icons, in reading order. Labels are read out as one list; icons are drawn at 22px, usually inline SVG using currentColor.
columnsnumber3Number of columns in the grid.
titleReactNode—The card's title, above the grid.
descriptionReactNode—A line or two under the grid.
spreadnumber1Multiplies how far the icons fly.
scatteredboolean—Controls the state from outside, for example to burst the icons when the card scrolls into view.
onScatterChange(scattered: boolean) => void—Called when hover, a tap or the keyboard asks to change the state.
labels{ group: (names: string[]) => string }—Writes the grid's accessible name from the item labels; the default is “Includes …”.
...restHTMLAttributes<HTMLDivElement>—Other attributes go to the card's root <div>.

Accessibility

  • The grid is one button named from the item labels (labels.group), with aria-pressed showing whether the icons are scattered; the icons themselves are hidden from screen readers.
  • Enter or Space toggles the burst from the keyboard, and the focus ring is visible; moving focus away gathers the icons again.
  • On touch a tap on the grid toggles it, bursting from where the finger landed.
  • Reduced motion keeps every icon in its cell and only lifts the tiles, with no flight, spin or spring.

Motion

Burst: 560ms cubic-bezier(0.16, 1, 0.3, 1), each icon up to 50ms late. Return: 1000ms spring (16% overshoot). Sockets and lift: 160–240ms.

Add it to your project

Pro members copy a prompt and their coding agent installs the source, the same way as the free components.

ScatterGrid.jsxscatter-grid.csstokens.cssREADME.md

Both files install together. The stylesheet reads the design tokens in tokens.css and carries fallbacks, so it also works alone.

Cards
Animated border card comes with Pro. Its preview shows once you unlock it.
Border beam comes with Pro. Its preview shows once you unlock it.
Card lock sheet comes with Pro. Its preview shows once you unlock it.