Skip to content

Lightbox Component

The Lightbox component represents interactive gallery and is based on Gallery with identical API.

The front of this component is based on glightbox.

Usage

Identical to Gallery you need to register relations or pass elements manually via elements() method.

use Czernika\OrchidImages\Screen\Components\Lightbox;
Lightbox::make('post.gallery'),

Options

Columns

See columns for Gallery.

Aspect ratio

See aspect ratio for Gallery.

Fit property

See fit property for Gallery.

Empty value

See empty value for Gallery.

Elements

See element for Gallery.

Glightbox options

There are 2 extra options, that are related to the glightbox dependency; zoomable() to enable or disable zoom for images, and draggable to allow drag or not. Both accept boolean as a value and default is false.

Lightbox::make('post.gallery')
->zoomable()
->draggable(false), // disable drag

Layout max width

See max width for Gallery.