https://github.com/d1soft/yii2-lightboxedimage-widget
Yii2 widget for lightboxed images based on Loker Dakar lightbox
https://github.com/d1soft/yii2-lightboxedimage-widget
lightbox php yii2 yii2-extension yii2-framework yii2-lightboxedimage yii2-widget yii2-widgets
Last synced: 16 days ago
JSON representation
Yii2 widget for lightboxed images based on Loker Dakar lightbox
- Host: GitHub
- URL: https://github.com/d1soft/yii2-lightboxedimage-widget
- Owner: d1soft
- Created: 2018-05-04T11:25:47.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-11T20:15:18.000Z (about 7 years ago)
- Last Synced: 2025-02-16T18:18:23.046Z (3 months ago)
- Topics: lightbox, php, yii2, yii2-extension, yii2-framework, yii2-lightboxedimage, yii2-widget, yii2-widgets
- Language: JavaScript
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
yii2-lightboxedimage
===================Yii2 framework widget for lightboxed images.
It extension is wrapper for javascript lightbox coded by [Lokesh Dakar](https://github.com/lokesh)
Installation
------------The preferred way to install is through [composer](http://getcomposer.org/download/).
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.
Usage
-----## View
```php
= 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
]
]); ?>
```## Widget options
### src
Image source path### alt
_default:_ `''`
Alternate image specified text### title
_default:_ `''`
Title image in lightbox### lightboxid
Lightbox id### lightboxClass
_default:_ `''`
Lightbox class### lightboxStyle
_default:_ `''`
Lightbox inline styles### imageId
_default:_ `''`
Image container id### imageClass
_default:_ `''`
Image container class### imageStyle
_default:_ `''`
Image container inline style## Client options
Client options you can see [here](http://lokeshdhakar.com/projects/lightbox2/#options)