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


Krajee Logo
yii2-slider Donate

Stable Version Unstable Version License Total Downloads Monthly Downloads Daily Downloads

An advanced slider input for Yii Framework 2 based on seiyria/bootstrap-slider plugin, 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.


You can see detailed documentation on usage of the extension.

Latest Release

Refer the CHANGE LOG for details on updates to various releases.


The preferred way to install this extension is through composer.

NOTE: Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki 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.



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


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


Change Log: yii2-slider

Version 1.3.3

Date: 05-Jan-2019

  • Update to latest release of bootstrap-slider plugin
  • Update bootstrap-slider plugin default value to 0.
  • Move all source code to src directory.
  • Update README.

Version 1.3.2

Date: 10-Jan-2016

  • Update to latest release of bootstrap-slider plugin
  • Enhancements for PJAX based reinitialization. Complements enhancements in kartik-v/yii2-krajee-base#52 and kartik-v/yii2-krajee-base#53.

Version 1.3.1

Date: 05-May-2015

  • (enh #6): Allow 0 to be a valid value
  • (enh #7): Enhance widget to use updated plugin registration from Krajee base
  • (enh #8): Upgrade plugin to latest release as of 25-Nov-2014.
  • (enh #12): New property pluginConflict to allow working with other slider plugins.
  • (enh #13): Upgrade plugin to latest release as of 05-May-2015.

Version 1.3.0

Date: 10-Nov-2014

  • Set dependency on Krajee base components
  • Set release to stable

Version 1.2.0

Date: 27-Oct-2014

  • enh #2: Upgrade plugin to latest release as of 27-Oct-2014.
  • Include formatter example in demos for setting custom tooltips.

Version 1.1.0

Date: 07-Jul-2014

  • Bug #1: Fix passing of the array value (or a delimited value set) for range select.
  • Bug #4: Fix wrong path for assets folder.
  • For range selects, values must be passed concatenated and separated with a , (comma).
  • Corrected validation of values - ensure only numeric values are passed as required by the plugin.
  • PSR4 alias change

Version 1.0.0

Date: 07-May-2014

Initial release


GitHub Stars
GitHub Forks



v1.3.2 is the latest of 6 releases

BSD-3-Clause license
28 github stars & 20 github forks
72 downloads in the last day
7683 downloads in the last 30 days
559471 total downloads