Customize
Images32 images
Names20 items
Columns
20
Rows
10
Scale
100
Zigzag
100
Row Offset
36
Smoothing
60
Drag Zoom
80
Hover Scale
108
Background
Text Color
Font
Text Scale
100%
Auto Play
Infinite Drag Grid
Gallery 221 views•6 uses
Props
15 propertiesimagesstring[]32 imagesnamesstring[]20 imagescolumnsnumber20rowsnumber10scalenumber100zigzagnumber100rowShiftnumber36smoothingnumber60dragZoomnumber80hoverScalenumber108backgroundcolor#fafafatextColorcolor#111111fontFamilystringvar(--font-dm-mon…textScalenumber100autoPlaybooleanfalseGet this component
Copies the component into your project, installs what it needs, and pulls down its images. Nothing to download by hand.
npx spark-ui-registry@latest add infinite-drag-gridWrites to components/spark-ui/ by default; override with --dir. The file is yours to edit; there is no package to keep in sync.
An endless plane of numbered tiles that pans in every direction under a drag or the wheel. Grabbing it zooms the whole plane out and letting go zooms it back in, the view eases after the pointer, and tiles leaving one edge come back in at the other.
KEY FEATURES
- ·The plane wraps on both axes, so it can be dragged forever in any direction without running out
- ·A press turns into a drag after 8px of travel or 300ms held; only then does the plane ease out to 80% and, on release, back to full size
- ·The view chases the pointer by a fixed share each frame, and the whole plane leans gently away from wherever the pointer rests
- ·Alternate columns drop and alternate rows shift sideways, breaking the grid into a scattered, print-like rhythm
- ·Tile positions are written straight to the DOM each frame, and tiles off screen are hidden, so hundreds stay smooth
- ·Each tile carries a mono number and name above it and grows slightly on hover