PHPackages                             kartik-v/yii2-widget-rangeinput - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kartik-v/yii2-widget-rangeinput

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

kartik-v/yii2-widget-rangeinput
===============================

An enhanced Yii 2 widget encapsulating the HTML 5 range input (sub repo split from yii2-widgets)

v1.0.2(7y ago)193.9M—5.7%3BSD-3-ClausePHP

Since Nov 8Pushed 7y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (1)Versions (4)Used By (3)

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

 [ ![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-widget-rangeinput--------------------)

[![Stable Version](https://camo.githubusercontent.com/3a726a8377f29a04d5731058ba40d605781cf8efb8158849c48279be77017741/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d72616e6765696e7075742f762f737461626c65)](https://packagist.org/packages/kartik-v/yii2-widget-rangeinput)[![Unstable Version](https://camo.githubusercontent.com/2f1a933715d52de735efad142f95232583ec8217eab71ba6806ebae6cdbc3064/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d72616e6765696e7075742f762f756e737461626c65)](https://packagist.org/packages/kartik-v/yii2-widget-rangeinput)[![License](https://camo.githubusercontent.com/a9ff08dc8c9243998bdacde291829e3570d590abd64d0510fe6925826651b4c8/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d72616e6765696e7075742f6c6963656e7365)](https://packagist.org/packages/kartik-v/yii2-widget-rangeinput)[![Total Downloads](https://camo.githubusercontent.com/15dfa3502217082a313cb88574e9d5ddf0efdcf5a61316a855d3ee7815012944/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d72616e6765696e7075742f646f776e6c6f616473)](https://packagist.org/packages/kartik-v/yii2-widget-rangeinput)[![Monthly Downloads](https://camo.githubusercontent.com/5728ff4cec44222820fe11fabfc8d6cbea16202b6af3da84a375b9ae7c785af7/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d72616e6765696e7075742f642f6d6f6e74686c79)](https://packagist.org/packages/kartik-v/yii2-widget-rangeinput)[![Daily Downloads](https://camo.githubusercontent.com/f28d5e1436195927ef8bca613baa364b8fd539822f650ed0165da328c535c507/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d72616e6765696e7075742f642f6461696c79)](https://packagist.org/packages/kartik-v/yii2-widget-rangeinput)

The RangeInput widget is a customized range slider control widget based on HTML5 range input. The widget enhances the default HTML range input with various features including the following:

- Specially styled for Bootstrap 3.x and Bootstrap 4.x with customizable caption showing the output of the control.
- Ability to prepend and append addons (very useful to show the min and max ranges, and the slider measurement unit).
- Allow the input to be changed both via the control or the text box.
- Automatically degrade to normal text input for unsupported Internet Explorer versions.

> NOTE: This extension is a sub repo split of [yii2-widgets](https://github.com/kartik-v/yii2-widgets). The split has been done since 08-Nov-2014 to allow developers to install this specific widget in isolation if needed. One can also use the extension the previous way with the whole suite of [yii2-widgets](http://demos.krajee.com/widgets).

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/). Check the [composer.json](https://github.com/kartik-v/yii2-widget-rangeinput/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.

To install, either run

```
$ php composer.phar require kartik-v/yii2-widget-rangeinput "*"

```

or add

```
"kartik-v/yii2-widget-rangeinput": "*"

```

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

Release Changes
---------------

[](#release-changes)

Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-widget-rangeinput/blob/master/CHANGE.md) for details on various releases and changes.

Demo
----

[](#demo)

You can refer detailed [documentation and demos](http://demos.krajee.com/widget-details/rangeinput) on usage of the extension.

Usage
-----

[](#usage)

```
use kartik\range\RangeInput;

// Usage with rangeinput and model
echo $form->field($model, 'rating')->widget(RangeInput::classname(), [
    'options' => ['placeholder' => 'Select range ...'],
    'html5Options' => ['min'=>0, 'max'=>1, 'step'=>1],
    'html5Container' => ['style' => 'width:350px'],
    'addon' => ['append'=>['content'=>'star']],

]);

// With model & without rangeinput
echo 'Adjust Contrast';
echo RangeInput::widget([
    'model' => $model,
    'attribute' => 'contrast',
    'html5Container' => ['style' => 'width:350px'],
    'addon' => ['append'=>['content'=>'%']],
]);

// Vertical orientation
echo 'Adjust Contrast';
echo RangeInput::widget([
    'name' => 'slider',
    'value' => 70,
    'orientation' => 'vertical',
    'html5Container' => ['style' => 'width:350px'],
]);
```

License
-------

[](#license)

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

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community12

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~699 days

Total

3

Last Release

2811d 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 (14 commits)")

---

Tags

pluginHTML5jqueryyii2extensionwidgetforminputrange

### Embed Badge

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

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

###  Alternatives

[kartik-v/yii2-widget-colorinput

An enhanced Yii 2 widget encapsulating the HTML 5 color input (sub repo split from yii2-widgets)

324.8M10](/packages/kartik-v-yii2-widget-colorinput)[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-switchinput

A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes &amp; radios as toggle switchinputes (sub repo split from yii2-widgets)

384.4M13](/packages/kartik-v-yii2-widget-switchinput)[kartik-v/yii2-widget-datepicker

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

1097.0M60](/packages/kartik-v-yii2-widget-datepicker)[kartik-v/yii2-widget-touchspin

A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes &amp; radios as toggle touchspines (sub repo split from yii2-widgets)

184.1M6](/packages/kartik-v-yii2-widget-touchspin)[kartik-v/yii2-widget-datetimepicker

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

1036.5M47](/packages/kartik-v-yii2-widget-datetimepicker)

PHPackages © 2026

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