Skip to main content

AssetGallery

A component for displaying a gallery of assets.

Example

Tsx
<AssetGallery  onSelect={handleAssetSelect}  multiSelect="manual"  initialSelectedAssets={initialSelectedAssets}  fixedHeight={false}  displayBulkActions={false}  />
Signature
function AssetGallery(props: AssetGalleryProps): void

Parameters

props

Props for the AssetGallery component.

Signature
interface AssetGalleryProps {    onSelect?: (assets: Asset[]) => void;    selectable?: boolean;    multiSelect?: 'auto' | 'manual';    initialSelectedAssets?: Asset[];    pageSize?: number;    fixedHeight?: boolean;    showHeader?: boolean;    className?: string;    onFilesDropped?: (files: File[]) => void;    bulkActions?: AssetBulkAction[];    displayBulkActions?: boolean;    onPageSizeChange?: (pageSize: number) => void;}

onSelect

property(assets: Asset[]) => void

selectable

propertyboolean

multiSelect

property'auto' | 'manual'

Defines whether multiple assets can be selected.

If set to 'auto', the asset selection will be toggled when the user clicks on an asset. If set to 'manual', multiple selection will occur only if the user holds down the control/cmd key.

initialSelectedAssets

propertyAsset[]

The initial assets that should be selected.

pageSize

propertynumber

The number of assets to display per page.

fixedHeight

propertyboolean

Whether the gallery should have a fixed height.

showHeader

propertyboolean

Whether the gallery should show a header.

className

propertystring

The class name to apply to the gallery.

onFilesDropped

property(files: File[]) => void

The function to call when files are dropped.

bulkActions

propertyAssetBulkAction[]

The bulk actions to display in the gallery.

displayBulkActions

propertyboolean

Whether the gallery should display bulk actions.

onPageSizeChange

property(pageSize: number) => void

The function to call when the page size changes.

Was this chapter helpful?
Report Issue
Edited Feb 2, 2026·Edit this page