All Projects → yii2mod → yii2-ion-slider

yii2mod / yii2-ion-slider

Licence: MIT license
Easily customizable range slider with skins support.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to yii2-ion-slider

yii2-sweet-submit
sweet sumit using sweetalert
Stars: ✭ 26 (+23.81%)
Mutual labels:  yii2, yii2-extension
background-translation-i18n
Based on the YII2 module to translate JSON formatted translation files on the web
Stars: ✭ 11 (-47.62%)
Mutual labels:  yii2, yii2-extension
ar-search
Provides unified search model for Yii ActiveRecord
Stars: ✭ 31 (+47.62%)
Mutual labels:  yii2, yii2-extension
yii2-linkable-behavior
Yii2 behavior to help creating urls easier
Stars: ✭ 12 (-42.86%)
Mutual labels:  yii2, yii2-extension
yii2-vote
Provides voting for any model 👍 👎
Stars: ✭ 70 (+233.33%)
Mutual labels:  yii2, yii2-extension
yii2-stat
Yii2 Multi Web Statistic Module (yametrika, google-analytic, own db-counter)
Stars: ✭ 18 (-14.29%)
Mutual labels:  yii2, yii2-extension
behavior-trait
Allows handling events via inline declared methods, which can be added by traits
Stars: ✭ 18 (-14.29%)
Mutual labels:  yii2, yii2-extension
yii2-lets-talk
With this extension you can open chat with someone in popular messengers using the link on your website.
Stars: ✭ 15 (-28.57%)
Mutual labels:  yii2, yii2-extension
yii2-bankcard-info
银行卡卡号分析(Yii2扩展)
Stars: ✭ 15 (-28.57%)
Mutual labels:  yii2, yii2-extension
yii2-jwt-tools
An easy way to configure JWT authentication and validation on Yii Framework 2 Projects
Stars: ✭ 22 (+4.76%)
Mutual labels:  yii2, yii2-extension
yii2-translatable
Translatable behavior aggregates logic of linking translations to the primary model
Stars: ✭ 15 (-28.57%)
Mutual labels:  yii2, yii2-extension
yii2-elasticsearch
Elasticsearch client based on official Elasticsearch PHP library
Stars: ✭ 14 (-33.33%)
Mutual labels:  yii2, yii2-extension
yii2-mailqueue
Yii2 mail queue component for yii2-swiftmailer.
Stars: ✭ 15 (-28.57%)
Mutual labels:  yii2, yii2-extension
yii2-newsletter
Module for saving user contacts from newsletter form to database
Stars: ✭ 17 (-19.05%)
Mutual labels:  yii2, yii2-extension
content
Content management system for Yii2
Stars: ✭ 54 (+157.14%)
Mutual labels:  yii2, yii2-extension
yii2-cashier
Yii2 Cashier provides an interface to Stripe's subscription billing services.
Stars: ✭ 43 (+104.76%)
Mutual labels:  yii2, yii2-extension
Yii2 Translate Manager
Translation Manager
Stars: ✭ 221 (+952.38%)
Mutual labels:  yii2, yii2-extension
install
basic script for project installation
Stars: ✭ 17 (-19.05%)
Mutual labels:  yii2, yii2-extension
yii2-pgsql
Improved PostgreSQL schemas for Yii2
Stars: ✭ 34 (+61.9%)
Mutual labels:  yii2, yii2-extension
yii2-array-query
Yii2 component that allows for searching/filtering the elements of an array.
Stars: ✭ 34 (+61.9%)
Mutual labels:  yii2, yii2-extension

RangeSlider Extension for Yii 2


Widget based on Ion.RangeSlider extension

Latest Stable Version Total Downloads License Build Status

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist yii2mod/yii2-ion-slider "*"

or add

"yii2mod/yii2-ion-slider": "*"

to the require section of your composer.json.

Usage

Once the extension is installed, simply add widget to your page as follows:

  1. Usage with ActiveForm and model
echo $form->field($model, "attribute")->widget(\yii2mod\slider\IonSlider::className(), [
        'pluginOptions' => [
           'min' => 0,
           'max' => 1,
           'step' => 1,
           'onChange' => new \yii\web\JsExpression('
                function(data) {
                     console.log(data);
                }
           ')
         ]
]); 
  1. Usage without ActiveForm and model
echo \yii2mod\slider\IonSlider::widget([
    'name' => 'slider',
    'type' => \yii2mod\slider\IonSlider::TYPE_DOUBLE,
    'pluginOptions' => [
        'min' => 0,
        'max' => 20,
        'from' => 2,
        'to' => 18,
        'step' => 1,
        'hide_min_max' => true,
        'hide_from_to' => true
    ]
]);
                                

To change the slider skin, you can configure the assetManager array in your application configuration:

'assetManager' => [
            'bundles' => [
                'yii2mod\slider\IonSliderAsset' => [
                    'css' => [
                        'css/normalize.css',
                        'css/ion.rangeSlider.css',
                        'css/ion.rangeSlider.skinFlat.css'
                     ]
                ],
            ],
        ]

Slider Options

You can customize the slider using pluginOptions, using one of the plugin options. Note that the type option should be configured on its own, and is not part of the pluginOptions array.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].