gevman/yii2-owl-carousel

Owl Carousel 2 for Widget Yii2

0.2.1 2018-04-10 12:19 UTC

This package is auto-updated.

Last update: 2024-10-21 02:41:47 UTC


README

installation

using composer

gevman/yii2-owl-carousel

example of usage

echo \Gevman\OwlCarousel\OwlCarousel::widget([
    'elements' => [
        Html::img(null, ['class' => 'owl-lazy', 'data' => ['src' => Yii::getAlias('@web/images/image-1.jpg')]]),
        Html::img(null, ['class' => 'owl-lazy', 'data' => ['src' => Yii::getAlias('@web/images/image-2.jpg')]]),
        Html::img(null, ['class' => 'owl-lazy', 'data' => ['src' => Yii::getAlias('@web/images/image-3.jpg')]]),
    ],
    'config' => [
        'items' => 1,
        'lazyLoad' => true,
        'loop' => true,
        'dots' => true,
        'autoplay' => true,
    ]
]);

For more options check Owl Carousel 2 Official Docs