ImageGallery
Image grid with modal preview.
ImageGallery
Image grid with modal preview. Clicking a thumbnail opens that image, and the modal footer provides bounded previous/next navigation.
Basic Usage
ImageGallery
Demo will load when visible.
API (Lite)
| Property | Type | Default | Description |
|---|---|---|---|
| items | Image list. Each item contains id, url, and optional name | ||
| startIndex | Current preview index; out-of-range values are clamped |
Events
| Property | Type | Default | Description |
|---|---|---|---|
| open | - | Fired after clicking a thumbnail and opening the preview | |
| close | - | Fired when the modal closes |
Interaction Contract
- Thumbnail buttons expose readable
aria-labelvalues. Imagealttext usesname; unnamed images keep empty alt text. - Empty
itemsrender no thumbnails and do not open the modal or emitopen. startIndexand list length changes are clamped to a valid index. Clearing the list closes the preview.- The modal inherits
TxModaldialog semantics, title linkage, close button, backdrop close, and Escape close behavior. - Footer Prev / Next controls only navigate inside valid bounds. Prev is disabled on the first image; Next is disabled on the last image.