ellotta/yii2-vegas

Yii2 wrapper for jaysalvat/vegas

Installs: 20

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0.0 2021-02-17 10:38 UTC

This package is auto-updated.

Last update: 2025-06-17 20:44:05 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.