Skip to content

zk-lightbox ​

Thumbnails that open the image in a modal window.

Props ​

PropTypeDefaultDescription
itemsarray[]Items with src and, optionally, thumbnail, alt and caption
idstring|nullnullPrefix of the ids of the dialogs
thumbnailsbooltrueShow the thumbnails (otherwise open the dialogs from your own buttons)
closeLabelstring'Close'Accessible name of the close button
openLabelstring'View {alt}'Accessible name of a thumbnail
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

Each image has its own native <dialog>, opened by its thumbnail (commandfor, with data-zk-modal as a fallback). Needs the script modal of zk-scripts: the component asks for it by itself. The previous and next buttons of the Vue component are not ported: close, then open another.

Examples ​

blade
<x-zk-lightbox :items="[
    ['src' => '/a.jpg', 'thumbnail' => '/a-small.jpg', 'alt' => 'Dawn', 'caption' => 'Dawn on the cliff'],
    ['src' => '/b.jpg', 'alt' => 'Dusk'],
]" />

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.