ValyroUI Русская версия

Image Result Grid

Result gallery with actions and a lightbox. Pro · Image generation › Results and editing

Grid or masonry of generations with selection, hover actions, a details panel and a zoomable viewer.

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add image-result-grid
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { ImageResultGrid } from 'valyro-ui-pro';

Props

PropTypeDefault
items *readonly GeneratedImage[]Finished images with their generation parameters, shown as tiles and in the viewer.
layout'grid' | 'masonry''grid'grid crops to squares; masonry keeps every image's aspect ratio.
minColumnWidthnumber200Narrowest column before the grid drops one. Default 200.
selectablebooleantrueCheckboxes and a selection bar. Default true.
selectedstring[]Controlled selected; use with onSelectedChange.
defaultSelectedstring[][]Initial selected when uncontrolled.
onSelectedChange(ids: string[]) => voidCalled with the new selected when it changes.
onAction(action: ImageAction, item: GeneratedImage) => void | falseCalled for every action. For download the grid also saves the file, unless the handler returns false.
actionsreadonly ImageAction[]ALL_ACTIONSActions offered on tiles and in the viewer. Default: all.
showDetailsbooleanfalseDetails panel (prompt, seed, parameters, copy) beside the grid for the active image.
pendingnumber0Placeholder tiles while images are on their way (e.g. a running batch).
renderPending(index: number) => ReactNodeRendered inside each pending tile, e.g. a GenerationProgress overlay.
emptyStateReactNodeShown when there are no items and nothing pending, in place of labels.empty.
localestringBCP 47 locale for numbers and dates; defaults to the ThemeProvider's, then the browser's.
labelsPartial<ImageResultGridLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Generation Progress · Next: Image Compare · All Image generation