Infinite moodboard

Pro

An endless board of photos you can throw around with momentum, where a click grows any photo to fill the frame.

Live · keyboard ready
  • Inspiration boards, portfolios, and brand galleries meant to be explored.
  • Showing a large visual collection in a small frame without pagination.
  • Galleries that need an order or a count, like product images; use carousel or product-gallery.
  • Pages where the wheel must always scroll the page; use photo-grid.

Installation

Pro source and install commands unlock with a Pro plan.

example.tsx
import { InfiniteMoodboard } from "@/components/arc/infinite-moodboard/infinite-moodboard";import { photos } from "@/components/arc/lib/media"; export function Inspiration() {  return <InfiniteMoodboard photos={[...photos]} label="Interiors and places" />;}

InfiniteMoodboard

An endless board of photos. Drag with momentum or pan with a trackpad or wheel; each photo trails the motion by its own depth. Clicking a photo grows it out of its spot to fill the frame, and it flies back home on close.

PropTypeDefaultDescription
photosRequired{ src: string; alt: string; width: number; height: number }[]–Photos to scatter. They repeat in a pattern that never places a photo beside a copy of itself (with 20 or more photos).
cellSizenumber–Grid cell size in px. Each cell holds one photo. Defaults to about a quarter of the frame width, between 130 and 240.
onFocusChange(photo: MoodboardPhoto | null) => void–Called when a photo opens or closes.
labelstring"Moodboard"Accessible name for the board.
aspectRatiostring"16 / 11"CSS aspect ratio of the frame.
classNamestring–Extra class on the root.
styleCSSProperties–Inline styles on the root.
Tab
Moves through the visible photos. A photo that takes focus off screen glides into view.
Arrow keys
Glides the board one cell in that direction.
EnterorSpace
Opens the focused photo.
Escape
Closes the open photo and returns focus to its tile.
  • The board is a named region with aria-roledescription="pannable board". Every tile is a button named with the photo's alt text.
  • The open photo is a focused button with the alt text, labelled to close. Focus returns to the tile when it closes.
  • Pointer focus draws no ring; keyboard focus shows Arc's shared focus ring.
  • Dragging tracks 1:1; release hands the last 90 ms of velocity to an exponential deceleration, like native scrolling.
  • Each photo trails the camera by its own depth, so the board stretches slightly in motion and settles at rest.
  • Opening grows the photo from its exact on-screen rect on a spring while the board blurs and recedes; closing flies it back to wherever its tile is now.
  • Reduced motion removes momentum and the depth trail, and the open photo crossfades instead of flying.
  • The cell size follows the frame width, so phones show two to three photos per row.
  • Touch: the frame owns drag gestures (touch-action: none). Tap opens a photo.
  • Only about 20 to 35 tiles are mounted at once. React re-renders only when the visible cell range changes; every frame writes transforms directly.
  • Images fade in once decoded, and the loop stops when the board comes to rest.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

  • Pass intrinsic width and height for every photo so tiles keep the real aspect ratio and the open transition is a pure scale.
  • The board captures the wheel inside it; give it a clear frame so people know where panning applies.
  • Only cells near the viewport are mounted, so large photo sets are fine; the pattern repeats with period equal to the photo count.

The full library index for assistants is at /llms.txt.