Drag & physics

Infinite canvas

An endless gallery you drag and throw in every direction. Cells recycle, so it stays light.

Paste it into ChatGPT, Claude, Cursor or v0.
cell width220
gap22

Usage

React
import { InfiniteCanvas } from '@vizzele/react';

<InfiniteCanvas
  items={photos}
  itemWidth={220}
  itemHeight={280}
  renderItem={(photo) => <img src={photo.src} alt={photo.alt} draggable={false} />}
  style={{ height: '80vh' }}
/>

Props

PropTypeDefaultDescription
itemsT[]—Content; it repeats to fill the plane.
renderItem(item: T, i: number) => ReactNode—Cell content.
itemWidth / itemHeightnumber240 / 300Cell size.
gapnumber24Space between cells.
staggerbooleantrueOffset alternate columns (masonry feel).

Accessibility

  • Focusable region; arrow keys pan.
  • Cells shrink a touch at high speed — a “lens” that keeps fast throws readable.