ellotta / yii2-vegas
Yii2 wrapper for jaysalvat/vegas
1.0.0
2021-02-17 10:38 UTC
Requires
- bower-asset/vegas: 2.4.*
- yiisoft/yii2: 2.0.*
This package is auto-updated.
Last update: 2026-02-17 22:21:07 UTC
README
Yii2 wrapper for Vegas: a jQuery/Zepto plugin to add beautiful backgrounds and Slideshows to DOM elements
Installation
The preferred way to install this extension is through composer.
Either run
composer require --dev ellotta/yii2-vegas "*"
or add
"ellotta/yii2-vegas": "*"
to the require-dev section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by :
Vegas::widget([ 'selector' => 'body', //default selector 'jsOptions' => [ 'slides' => [ ['src' => 'https://dummyimage.com/800x600/000/ffffff.gif&text=1'], ['src' => 'https://dummyimage.com/800x600/000/ffffff.gif&text=2'], ['src' => 'https://dummyimage.com/800x600/000/ffffff.gif&text=3'], ], 'animation' => 'kenburnsUp', ], ]);
See plugin documentation for more information.