Components/GretTech/Gravity Dots

Gravity Dots

A dot-grid background that bends toward the cursor like a gravity well. Click to send a glowing shockwave through it.

v0

Installation

Full Setup guide

Install the component automatically via Shadcn CLI.

npx shadcn@latest add https://www.grettech.com/api/registry/gravity-dots

Props

PropTypeDefaultDescription
children
React.ReactNode-Content shown over the dots.
gap
number24Distance between dots in px.
dotSize
number1.6Dot radius in px.
color
stringText colour at 28% opacityResting dot colour. By default the dots use the text colour at low opacity, so they follow light and dark mode.
glowColor
string"#0ea5e9"Colour of dots near the cursor and in shockwaves.
radius
number170Reach of the cursor's pull in px.
strength
number0.32How far dots move toward the cursor, 0–1.
shockwave
booleantrueClicking sends a shockwave.
className
string-Extra classes for the root element (transparent by default; set a background here).
...props
React.HTMLAttributes<HTMLDivElement>-Any other attributes, passed to the root element (transparent by default; set a background here).