victororozco/yii2-owlcarousel2

Carousel adapted for yii2 framework

dev-master 2018-04-30 03:26 UTC

This package is not auto-updated.

Last update: 2024-06-18 17:29:44 UTC


README

OwlCarousel

Carousel adapted for yii2 framework

Animation:

animated.css

Owl Carousel

owl.carousel.js

Installation

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.

Usage

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(); ?>