Carousel adapted for yii2 framework
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist victororozco/yii2-owlcarousel2 "*"
or add
"victororozco/yii2-owlcarousel2": "*"
to the require section of your composer.json
file.
Once the extension is installed, simply use it in your code by :
use victororozco\owlcarousel\OwlCarousel;
<?php OwlCarousel::begin([
'item' => 1,
'loop' => true,
'margin' => 10,
'autoplay' => true,
'animateIn' => 'fadeInLeft',
'animateOut' => 'slideOutDown',
]); ?>
<div class="item">
<img src="https://lorempixel.com/1024/480/technics/5/" />
</div>
<div class="item">
<img src="https://lorempixel.com/1024/480/technics/2/" />
</div>
<div class="item">
<img src="https://lorempixel.com/1024/480/technics/3/" />
</div>
<?php OwlCarousel::end(); ?>