Kinetic Grid
An interactive grid background whose lines and nodes ripple outward wherever you click.
Updated Added Changelog
Preview
Move the cursor. Click for ripples.
Installation
pnpm dlx shadcn@latest add @satoriui/kinetic-gridAdds components/satori-ui/kinetic-grid.tsx to your project and installs its dependencies.
Usage
Examples
Following your theme
The grid draws in the current text colour and glows in accentColor, so the grid matches the page in light and dark mode. Switch the theme to see it change.
Built for the way you work
The grid draws in your text colour and glows in your primary, in light and dark.
Light and monochrome
A white field with black lines and a black glow, for a page with no accent colour.
Black ink on white paper
Props
childrenContent shown over the grid. It fills the grid, so lay it out yourself, for example with flex centring.
TypeReactNodeclassNameClasses for the wrapper. The grid fills it, so give it a height. Its background shows through the grid.
TypestringcolorColour of the lines and dots, as any CSS colour, including a theme variable. They are drawn faintly, so pick the colour you would use for text on this background.
TypestringDefault"currentColor"accentColorColour of the glow under the pointer and of the click ripples, as any CSS colour.
TypestringDefault"var(--primary)"reducedMotion"user" follows a surrounding MotionConfig, then the visitor's reduce-motion setting. "always" and "never" force the calm or the full version.
Type"user""always""never"Default"user"
Also takes every <div> prop except color.
Reduced motion
Kinetic Grid follows the visitor's “reduce motion” device setting on its own: movement, blur and looping effects stop, and fades stay. Use the Reduced motion button on the preview to see that version. To decide yourself, set the reducedMotion prop on one instance, or wrap a whole section or app in Motion's MotionConfig.