Skip to content

dynamikaweb/yii2-tiny-slider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dynamikaweb/yii2-tiny-slider

php version pkg version license quality build

Documentation

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require dynamikaweb/yii2-tiny-slider "*"

or add

"dynamikaweb/yii2-tiny-slider": "*"

to the require section of your composer.json file.

How to use

<?PHP
use dynamikaweb\tiny\Slider;
use yii\helpers\Html;
?>

<?php Slider::begin([
  'pluginOptions' => [
    'autoplay'          => true,
    'autoplayTimeout'   => 3000,
    'items'             => 1
  ]
])?>

<?=Html::img('foo.png')?>
<?=Html::img('bar.png')?>
<?=Html::img('zee.png')?>

<?php Slider::end()?>

Configuration

Property Type Description
export string javascript constant slider name
container string html root tag default: div
containerOptions array html root tag options
pluginOptions array javascript plugin options
clientOptions array alias to pluginOptions
clientScript string\JsExpression javascript custom function or script
example: slider => console.log(slider)
example: console.log(my_export)

dynamika soluções web This project is under BSD-3-Clause license.