Skip to content

GalleryView

GalleryView<T>(props): ReactElement

Defined in: react/components/data/gallery-view.tsx:64

A responsive, scrollable grid of arbitrary items with 2D keyboard navigation.

  • Columns flow automatically from the container width (itemWidth is the basis); pass columns to fix them.
  • Arrows move the cursor (←→ within a row, ↑↓ across rows; Page/Home/End jump); the selected cell is scrolled into view.
  • Mouse wheel and the scrollbar scroll the grid; clicking a cell selects it (double-click activates).

Highlighting is the caller’s job via renderItem(item, { selected }). The body is a ScrollableBox, so it scales to large galleries by scrolling (not virtualized — every item mounts).

T

GalleryViewProps<T>

ReactElement