PHPackages                             kartik-v/yii2-slider - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. kartik-v/yii2-slider

ActiveYii2-extension

kartik-v/yii2-slider
====================

An advanced slider input for Yii Framework 2 for both touch enabled and desktop devices based on bootstrap-slider.

v1.3.2(10y ago)30784.4k—1.3%20[3 issues](https://github.com/kartik-v/yii2-slider/issues)[3 PRs](https://github.com/kartik-v/yii2-slider/pulls)4BSD 3-ClausePHP

Since Jun 20Pushed 6y ago4 watchersCompare

[ Source](https://github.com/kartik-v/yii2-slider)[ Packagist](https://packagist.org/packages/kartik-v/yii2-slider)[ Docs](https://github.com/kartik-v/yii2-slider)[ RSS](/packages/kartik-v-yii2-slider/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (7)Used By (4)

 [ ![Krajee Logo](https://camo.githubusercontent.com/4addfbb3869c3fc7d79befea4f06d9cf3655a686fb503df0da1d725859cfdef9/687474703a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f6b72616a65652d6c6f676f2d622e706e67) ](http://demos.krajee.com "Krajee Demos")
 yii2-slider ---

 [ ![Donate](https://camo.githubusercontent.com/4af77d425ca202e55ab3d711b438e238ded194735bc345a019ac060e03e26227/687474703a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f646f6e6174652e706e67) ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DTP3NZQ6G2AYU "Donate via Paypal")
===============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#------------------------yii2-slider--------------------)

[![Stable Version](https://camo.githubusercontent.com/29efd2cb1a86d168ef714a4acba2f93a4f4e600d73a70e18d45b865085137f1d/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736c696465722f762f737461626c65)](https://packagist.org/packages/kartik-v/yii2-slider)[![Unstable Version](https://camo.githubusercontent.com/fd16286ff92174d1ef6f8860906d16a6b2f18fde677b103025a75eb96a01858a/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736c696465722f762f756e737461626c65)](https://packagist.org/packages/kartik-v/yii2-slider)[![License](https://camo.githubusercontent.com/606dfa3bacdbbf374b4f12f7d5a8cabc6eeadce6897a4a31efd5149a481325e7/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736c696465722f6c6963656e7365)](https://packagist.org/packages/kartik-v/yii2-slider)[![Total Downloads](https://camo.githubusercontent.com/085edad4fb4075a3e3a089e164c57984de07fcde50c5e3c1abfccc70ea379f2e/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736c696465722f646f776e6c6f616473)](https://packagist.org/packages/kartik-v/yii2-slider)[![Monthly Downloads](https://camo.githubusercontent.com/7efb91c0ae3354c075b5bb728fe8c93bb65ea9b09682e3904d7bce06aa8111dd/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736c696465722f642f6d6f6e74686c79)](https://packagist.org/packages/kartik-v/yii2-slider)[![Daily Downloads](https://camo.githubusercontent.com/1903fb8f926c08e10ccccb02cb3644d623c6a82f099df20d18dcfb0e42eb2b76/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d736c696465722f642f6461696c79)](https://packagist.org/packages/kartik-v/yii2-slider)

An advanced slider input for Yii Framework 2 based on [seiyria/bootstrap-slider plugin](https://github.com/seiyria/bootstrap-slider), which is a fork of the bootstrap-slider by Stefan Petre from eyecon.ru. The slider input offers these advanced features

- vertical or horizontal orientation of slider
- setup your minimum and maximum values
- setup your step increments
- range selector (multiple handles to control the range)
- three shapes for handles
- touch capablity and support for touch devices

Additional enhancements added for this widget (by Krajee):

- allows to configure slider selection and handle colors.
- preselected styles to color your slider and handles.
- automatically trigger change of base field on slider stop to enforce Yii ActiveField validation
- automatically set plugin options based on base field value (parse array input value for range)
- automatically disable slider based on disabled/readonly options.

### Demo

[](#demo)

You can see detailed [documentation](http://demos.krajee.com/slider) on usage of the extension.

Latest Release
--------------

[](#latest-release)

> Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-slider/blob/master/CHANGE.md) for details on updates to various releases.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

> NOTE: Check the [composer.json](https://github.com/kartik-v/yii2-slider/blob/master/composer.json) for this extension's requirements and dependencies. Read this [web tip /wiki](http://webtips.krajee.com/setting-composer-minimum-stability-application/) on setting the `minimum-stability` settings for your application's composer.json.

Either run

```
$ php composer.phar require kartik-v/yii2-slider "dev-master"

```

or add

```
"kartik-v/yii2-slider": "dev-master"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

### Slider

[](#slider)

```
use kartik\slider\Slider;
echo Slider::widget([
    'name' => 'slider',
    'sliderColor' => Slider::TYPE_DANGER,
    'handleColor' => Slider::TYPE_DANGER,
    'pluginOptions' => [
        'orientation' => 'horizontal',
        'handle' => 'round',
        'min' => 0,
        'max' => 255,
        'step' => 1
    ],
]);
```

License
-------

[](#license)

**yii2-slider** is released under the BSD-3-Clause License. See the bundled `LICENSE.md` for details.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity50

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 86.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~113 days

Total

6

Last Release

3781d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3592619?v=4)[Kartik Visweswaran](/maintainers/kartik-v)[@kartik-v](https://github.com/kartik-v)

---

Top Contributors

[![kartik-v](https://avatars.githubusercontent.com/u/3592619?v=4)](https://github.com/kartik-v "kartik-v (32 commits)")[![Arnaud-G1](https://avatars.githubusercontent.com/u/8536657?v=4)](https://github.com/Arnaud-G1 "Arnaud-G1 (2 commits)")[![chabberwock](https://avatars.githubusercontent.com/u/7067122?v=4)](https://github.com/chabberwock "chabberwock (1 commits)")[![jasonhancock](https://avatars.githubusercontent.com/u/1113245?v=4)](https://github.com/jasonhancock "jasonhancock (1 commits)")[![katag9k](https://avatars.githubusercontent.com/u/3019634?v=4)](https://github.com/katag9k "katag9k (1 commits)")

---

Tags

yii2extensionwidgetbootstrapsliderrangebootstrap 3

### Embed Badge

![Health badge](/badges/kartik-v-yii2-slider/health.svg)

```
[![Health](https://phpackages.com/badges/kartik-v-yii2-slider/health.svg)](https://phpackages.com/packages/kartik-v-yii2-slider)
```

###  Alternatives

[kartik-v/yii2-date-range

An advanced Yii 2 date range picker input for based on bootstrap-daterangepicker plugin.

894.4M42](/packages/kartik-v-yii2-date-range)[kartik-v/yii2-field-range

Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more

232.1M26](/packages/kartik-v-yii2-field-range)[kartik-v/yii2-sortable

Create sortable lists and grids using HTML5 drag and drop API for Yii 2.0.

433.8M13](/packages/kartik-v-yii2-sortable)[kartik-v/yii2-money

An advanced money mask input for Yii 2.0 based on jquery maskmoney plugin styled for Bootstrap 3.

29915.4k10](/packages/kartik-v-yii2-money)[kartik-v/yii2-widget-rating

A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)

444.1M8](/packages/kartik-v-yii2-widget-rating)[kartik-v/yii2-widget-timepicker

Enhanced Yii2 wrapper for the bootstrap timepicker plugin (sub repo split from yii2-widgets)

404.9M14](/packages/kartik-v-yii2-widget-timepicker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
