Skip to content

melledijkstra/yii2-slideshow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 Slideshow

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,
    ]
]); ?>

Releases

No releases published

Packages

No packages published

Languages