Yii2 framework widget for lightboxed images.
It extension is wrapper for javascript lightbox coded by Lokesh Dakar
The preferred way to install is through composer.
Either run
php composer.phar require --prefer-dist d1soft/yii2-lightboxedimage "*"
or add
"d1soft/yii2-lightboxedimage": "*"
to the require section of your composer.json
file.
<?= LiteboxedImage::widget([
'options' => [
'src' => '/path/to/image.jpg',
'lightboxId' => 'lightBox',
'lightboxClass' => 'lightBoxClass',
'lightboxStyle' => 'max-height: 350px',
'imageId' => 'imageId',
'imageClass' => 'imageClass',
'imageStyle' => 'max-width: 250px',
'title' => 'Image title',
'alt' => 'Some image',
],
'clientOptions' => [
'resizeDuration' => 200,
'wrapAround' => true
]
]); ?>
Image source path
default: ''
Alternate image specified text
default: ''
Title image in lightbox
Lightbox id
default: ''
Lightbox class
default: ''
Lightbox inline styles
default: ''
Image container id
default: ''
Image container class
default: ''
Image container inline style
Client options you can see here