PHPackages                             kartik-v/yii2-widget-touchspin - 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-touchspin

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

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)

v1.2.4(4y ago)184.1M—6.6%2[1 issues](https://github.com/kartik-v/yii2-widget-touchspin/issues)6BSD-3-ClauseJavaScript

Since Nov 8Pushed 4y ago1 watchersCompare

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

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

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

 [ ![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-touchspin--------------------)

[![Stable Version](https://camo.githubusercontent.com/540136c03913b78dd732fabc948888d5bd3d2dfaed4efcc12d3de242e39f18eb/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d746f7563687370696e2f762f737461626c65)](https://packagist.org/packages/kartik-v/yii2-widget-touchspin)[![Unstable Version](https://camo.githubusercontent.com/817cc1bbf2b1bd6323abbb72a3f6c4c33a145fc9252911cefaf8154d56a68c19/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d746f7563687370696e2f762f756e737461626c65)](https://packagist.org/packages/kartik-v/yii2-widget-touchspin)[![License](https://camo.githubusercontent.com/6f1a481e5ff31244807cd95f20890242d003939ac0f8c3563ec2adfc5053f79f/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d746f7563687370696e2f6c6963656e7365)](https://packagist.org/packages/kartik-v/yii2-widget-touchspin)[![Total Downloads](https://camo.githubusercontent.com/c169a3374669eb31a9f86bf3d677d625b15df5716b1c2d674c62ca67fe40667d/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d746f7563687370696e2f646f776e6c6f616473)](https://packagist.org/packages/kartik-v/yii2-widget-touchspin)[![Monthly Downloads](https://camo.githubusercontent.com/500e5dbddd3b116e41d5e1c26e873ec0cd3fe0f39214985858a1633e49ae5991/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d746f7563687370696e2f642f6d6f6e74686c79)](https://packagist.org/packages/kartik-v/yii2-widget-touchspin)[![Daily Downloads](https://camo.githubusercontent.com/e9934b8ff32bc08a0f481b3ca16a40ab3a2939b589cbff9f5bf1ef8702e43299/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d7769646765742d746f7563687370696e2f642f6461696c79)](https://packagist.org/packages/kartik-v/yii2-widget-touchspin)

The TouchSpin widget is a Yii 2 wrapper for for the [bootstrap-touchspin](http://www.virtuosoft.eu/code/bootstrap-touchspin) plugin by István Ujj-Mészáros, with certain additional enhancements. This input widget is a mobile and touch friendly input spinner component for Bootstrap 3. You can use the widget buttons to rapidly increase and decrease numeric and/or decimal values in your input field. The widget can be setup to include model validation rules for the related model attribute.

> 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-touchspin/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-touchspin "*"

```

or add

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

```

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

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

[](#release-changes)

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

Demo
----

[](#demo)

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

Usage
-----

[](#usage)

```
use kartik\touchspin\TouchSpin;

echo TouchSpin::widget([
    'name' => 'volume',
    'options' => ['placeholder' => 'Adjust...'],
    'pluginOptions' => ['step' => 1]
]);
```

License
-------

[](#license)

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

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity51

Moderate usage in the ecosystem

Community16

Small or concentrated contributor base

Maturity68

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 ~415 days

Recently: every ~616 days

Total

7

Last Release

1719d 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 (20 commits)")

---

Tags

pluginjqueryyii2extensiontouchwidgetbootstrapforminputspinner

### Embed Badge

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

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

###  Alternatives

[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-timepicker

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

404.9M14](/packages/kartik-v-yii2-widget-timepicker)[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-rangeinput

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

193.9M3](/packages/kartik-v-yii2-widget-rangeinput)[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)

PHPackages © 2026

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