melledijkstra/yii2-slideshow

A simple slideshow (not only for images). It generates a view

Installs: 84

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Type:yii2-extension

dev-master 2016-11-18 17:41 UTC

This package is not auto-updated.

Last update: 2025-02-02 03:37:03 UTC


README

A simple slideshow made with http://idangero.us/swiper.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist melledijkstra/yii2-slideshow "*"

or add

"melledijkstra/yii2-slideshow": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= \melledijkstra\slideshow\Slideshow::widget([
    'items' => [
        [
            'content' => 'Slide 1', // tip: $this->render('view');
        ],
        [
            'content' => 'Slide 2',
            'active' => true,
        ]
    ],
    // The client options will be passed to the Javascript swiper library
    // @see http://idangero.us/swiper/api/#parameters
    'clientOptions' => [
        'direction' => 'horizontal',
        'speed' => 300,    
        'autoplay' => true,
    ]
]); ?>