amilna/yii2-sequence-widget Sequencejs widget for Yii2


Sequence JS Widget for Yii2

A customizable sequencejs plugin for Yii2 based on Sequencejs.


The preferred way to install this extension is through composer.

Either run

php composer.phar require "amilna/yii2-sequence-widget" "*"

or add

"amilna/yii2-sequence-widget" : "*"

to the require section of your application's composer.json file.

Since this extensions stil in dev stages, be sure also add following line in composer.json file.


In view:

use amilna\sequencejs\SequenceJs;

echo SequenceJs::widget([
        'dataProvider'=>$dataProvider, // active data provider
        'targetId'=>'sequence', //id of rendered sequencejs (the container will constructed by the widget with the given id)
        'imageKey'=>'front_image', //model attribute to be used as image
        'backgroundKey'=>'image', //model attribute to be used as background
        'theme' => 'parallax', //available themes: default, parallax, modern

        'css' => 'test.css', // url of css to overide default css relative from @web    

        // example to overide default themes
        'itemView'=>function ($model, $key, $widget) {                  
                        $type = ['aeroplane','balloon','kite'];
                        $html = '<li>
                                    <div class="info">
                                    <img class="sky" src="'.$model->image.'" alt="Blue Sky" />
                                    <img class="'.$type[$key%3].'" src="'.$model->front_image.'" alt="Aeroplane" />

                        return $html;

        //  example to overide default options  more options on
                'autoPlay'=> true,
                'autoPlayDelay'=> 3000,
                'nextButton'=> true,
                'prevButton'=> true,
                'preloader'=> true,
                'navigationSkip'=> false

        //  example to use widget without active data provider (the target selector should already rendered)
        'targets' => [
            '.sequencejs' => [
                'autoPlay'=> true,
                'autoPlayDelay'=> 3000,
                'nextButton'=> true,
                'prevButton'=> true,
                'preloader'=> true,
                'navigationSkip'=> false



GitHub Stars
GitHub Forks



0.0.2 is the latest of 2 releases

MIT license
1 github stars & 1 github forks
0 downloads in the last day
0 downloads in the last 30 days
714 total downloads