RayCraftDocs
v1.0.3 raycraft.dev
On this page

ImageGallery

Free

Grid of thumbnails that opens a full-screen viewer (Lightbox) with previous and next buttons, the arrow keys and Escape.

Example

ImageGallery control

Parameters

ImageGallery

ParameterTypeDescription
ClassstringExtra CSS classes added to the root element.
ImagesIEnumerable<GalleryImage>GalleryImage(src, alt, caption, thumbnail) items.
MinSizestringSmallest thumbnail width as a CSS length (default 10rem).
StylestringInline style added to the root element.

Lightbox

ParameterTypeDescription
ClassstringExtra CSS classes added to the root element.
ImagesIReadOnlyList<GalleryImage>GalleryImage(src, alt, caption, thumbnail) items.
IndexintIndex of the shown image. Use with @bind-Index.
OpenboolWhether the viewer is shown. Use with @bind-Open.
StylestringInline style added to the root element.

Events

Lightbox

EventTypeDescription
IndexChangedEventCallback<int>Raised when another image is shown.
OpenChangedEventCallback<bool>Raised when the viewer closes.

Package

ImageGallery is part of RayCraft Free. Package: RayCraft.Blazor. It comes from nuget.org. See Getting started.