Package Data | |
---|---|
Maintainer Username: | lumenpink |
Maintainer Contact: | makitrataras@gmail.com (Taras Makitra) |
Package Create Date: | 2023-01-28 |
Package Last Update: | 2025-02-08 |
Home Page: | |
Language: | PHP |
License: | Apache-2.0 |
Last Refreshed: | 2025-02-19 03:00:02 |
Package Statistics | |
---|---|
Total Downloads: | 9 |
Monthly Downloads: | 4 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
This module is a wrapper for Lightbox2
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist lumenpink/yii2-lightbox "~0.1.0"
or add
"lumenpink/yii2-lightbox": "~0.1.0"
to the require section of your composer.json
file.
Once the extension is installed, simply add widget to your page as follows:
use yeesoft\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',
],
],
]);