d1soft/yii2-lightboxedimage

Yii2 widget to create lightboxed images

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Language:JavaScript

Type:package

dev-master 2018-05-11 20:15 UTC

This package is not auto-updated.

Last update: 2024-05-09 22:28:15 UTC


README

Yii2 framework widget for lightboxed images.
It extension is wrapper for javascript lightbox coded by Lokesh Dakar

yii2-lightboxedimage

Installation

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.

Usage

View

	<?= 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