kuliev/yii2-lightbox

Lightbox2 widget for Yii2

Maintainers

Package info

github.com/kuliev/yii2-lightbox

Type:yii2-extension

pkg:composer/kuliev/yii2-lightbox

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2026-02-28 09:26 UTC

This package is auto-updated.

Last update: 2026-03-28 10:49:19 UTC


README

Lightbox widget for Yii2

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist kuliev/yii2-lightbox "^1.0"

or add

"kuliev/yii2-lightbox": "^1.0"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

use kuliev\lightbox\Lightbox;

echo Lightbox::widget([
    'options' => [
        'fadeDuration' => '2000',
        'albumLabel' => "Image %1 of %2",
    ],
    'linkOptions' => ['class' => 'pull-left'],
    'imageOptions' => ['class' => 'thumbnail'],
    'items' => [
        [
            'thumb' => '/images/image01-120x90.jpg',
            'image' => '/images/image01.jpg',
            'title' => 'Image 1',
            'group' => 'image-set1',
        ],
        [
            'thumb' => '/images/image02-120x90.jpg',
            'image' => '/images/image02.jpg',
            'title' => 'Image 2',
            'group' => 'image-set1',
        ],
    ],
]);