jucksearm/yii2-sly-slider

Yii2 extension is a wrapper for the jquery slider 'sly' http://darsa.in/sly/

Installs: 700

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 3

Open Issues: 0

Type:yii2-extension

1.0.1 2017-01-31 05:14 UTC

This package is not auto-updated.

Last update: 2024-04-13 17:24:40 UTC


README

Javascript Sly which can be found here: http://darsa.in/sly/ Support fot horizontal only

Installation

Install via composer:

  composer require "jucksearm/yii2-sly-slider"

OR add this to your composer.json require section

  "jucksearm/yii2-sly-slider": "*",

Install via zip:

download file https://github.com/jucksearm/yii2-sly-slider/archive/master.zip

extract file to vendor folder as:

   vendor
   |- jucksearm
     |- yii2-sly-slider
       | ......

How to use

This extensions is design for widgets, You can call it every where. Example code here:

<?php echo jucksearm\sly\Sly::widget([
    'id' => 'slider',                           ** unique id
    'items'=> [
        ['content' => '<img src=""></img>'],    ** insert images
        ['content' => '<div>test</div>'],       ** insert html DOM
        ...
    ],
    'htmlOptions' => [
        'style' => 'height:200px;',             ** custom options
        'class' => 'slider-h',
        ...
    ],
    'widgetOptions' => [
        'itemNav' => 'basic',                   ** setting widgets
        ...
    ]
]); ?>

Example

You can copy example code in example.php to your view render in some controller.

Option

Detailed description of all available yii2sly widget options.