PHPackages                             kartik-v/yii2-checkbox-x - 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-checkbox-x

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

kartik-v/yii2-checkbox-x
========================

Extended checkbox widget for bootstrap with three states and additional styles.

v1.0.7(4y ago)251.0M↓62.5%3[2 PRs](https://github.com/kartik-v/yii2-checkbox-x/pulls)10BSD-3-ClausePHP

Since Nov 9Pushed 3y ago2 watchersCompare

[ Source](https://github.com/kartik-v/yii2-checkbox-x)[ Packagist](https://packagist.org/packages/kartik-v/yii2-checkbox-x)[ Docs](https://github.com/kartik-v/yii2-checkbox-x)[ RSS](/packages/kartik-v-yii2-checkbox-x/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (8)Dependencies (2)Versions (9)Used By (10)

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

 [![Donate](https://camo.githubusercontent.com/0336bc43d88554a3f2d6c74dddf312bc2c65c2eacca70d83ae40f5567098d00e/68747470733a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f646f6e6174652e706e67)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DTP3NZQ6G2AYU "Donate via Paypal") [![kartikv](https://camo.githubusercontent.com/0cf29a542375e1a46e84d8bf5805a4e5c0a6ee98b6547ccdc0c55eed49d99c69/68747470733a2f2f63646e2e6275796d6561636f666665652e636f6d2f627574746f6e732f76322f64656661756c742d79656c6c6f772e706e67)](https://www.buymeacoffee.com/kartikv "Buy me a coffee")
==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#------------------------yii2-checkbox-x------------------)

[![Stable Version](https://camo.githubusercontent.com/a54f3abe82d0cf8d6cc3d7999d4125d6c63357725804add66720d1719a9925ad/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d636865636b626f782d782f762f737461626c65)](https://packagist.org/packages/kartik-v/yii2-checkbox-x)[![Unstable Version](https://camo.githubusercontent.com/daf9902ed9f5fb98d5cda01620a0fb1c500d090c046bd4c02e14a38449b66347/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d636865636b626f782d782f762f756e737461626c65)](https://packagist.org/packages/kartik-v/yii2-checkbox-x)[![License](https://camo.githubusercontent.com/f32488db654a301194988633cd37f656be43e4cb5ddd446b0df66f9f17eef2bf/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d636865636b626f782d782f6c6963656e7365)](https://packagist.org/packages/kartik-v/yii2-checkbox-x)[![Total Downloads](https://camo.githubusercontent.com/50787b4c4e45679a6f1b020761c7dcb0931e6bf0603bdd201615001e3b769eb4/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d636865636b626f782d782f646f776e6c6f616473)](https://packagist.org/packages/kartik-v/yii2-checkbox-x)[![Monthly Downloads](https://camo.githubusercontent.com/88625bb8b727ed006f993afafed4a51dacb009a30c28bb27dd11d371978c6b56/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d636865636b626f782d782f642f6d6f6e74686c79)](https://packagist.org/packages/kartik-v/yii2-checkbox-x)[![Daily Downloads](https://camo.githubusercontent.com/12d835f263018b0d3fba4cb2e911f5a9393ed673c937896fdaf0440003a63bce/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d636865636b626f782d782f642f6461696c79)](https://packagist.org/packages/kartik-v/yii2-checkbox-x)

An extended checkbox widget for Yii Framework 2 based on the [bootstrap-checkbox-x jQuery plugin](http://plugins.krajee.com/checkbox-x) by Krajee. This widget allows three checkbox states and includes additional styles. The plugin uses Bootstrap markup, glyphs, and CSS 3 styling by default, but it can be overridden with any other markup.

> NOTE: The checkbox plugin stores the values as integer format (and not boolean format) for checked and unchecked states.

Features
--------

[](#features)

- The plugin offers the following three states and values for the checkboxes (note the integer values):
    - `1`: Checkbox is checked.
    - `0`: Checkbox is unchecked.
    - `null`: Checkbox is indeterminate.
- You can set the plugin to allow **three states** or the default **two states** for the checkbox.
- Specifically uses Bootstrap styles &amp; glyphs (supports 3.x, 4.x. 5.x). One can configure the checked, unchecked, and indeterminate icons to be shown for the checkboxes.
- Special CSS 3 styling, to enhance the control to look like any Bootstrap form control. Supports the `has-error`, `has-success`, `has-warning`styling states like other Bootstrap form-controls.
- Plugin CSS styling automatically defaults the checkboxes to inline display. You can also control the markup for block display like in checkbox lists.
- You can add a `label` before or after with a `for` attribute and click on the label to change the checkbox values. Alternatively you can enclose the input within a `label` tag as well.
- Ability to navigate to the checkbox controls via keyboard, and modify the values using the `space` bar on the keyboard.
- Ability to size the checkbox control. Five prebuilt size templates are available `xl`, `lg`, `md`, `sm`, and `xs`.
- Triggers JQuery events for advanced development. The plugin automatically triggers the `change` event for the input, whenever the checkbox value is changed via clicking. Events currently available are `change` and `reset`.
- Ability to access methods and refresh the input dynamically via javascript at runtime.
- Disabled and readonly checkbox input support.
- Size of the entire plugin (JS and CSS) is less than 2KB when minified and gzipped. Its about 6KB when minified without gzipping (about 3KB for the JS and 3KB for the CSS).

### Docs &amp; Demo

[](#docs--demo)

You can see detailed [docs and demos](http://demos.krajee.com/checkbox-x) and the API [code documentation](https://docs.krajee.com/kartik-checkbox-checkboxx) on usage of the extension.

### Release Changes

[](#release-changes)

Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-checkbox-x/blob/master/CHANGE.md) for details on changes 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-checkbox-x/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-checkbox-x "@dev"

```

or add

```
"kartik-v/yii2-checkbox-x": "@dev"

```

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

Usage
-----

[](#usage)

### CheckboxX

[](#checkboxx)

```
use kartik\checkbox\CheckboxX;
echo CheckboxX::widget([
    'model' => $model,
    'attribute' => 'status',
    'pluginOptions' => [
        'threeState' => true,
        'size' => 'lg'
    ]
]);
```

License
-------

[](#license)

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

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity48

Moderate usage in the ecosystem

Community19

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

Recently: every ~547 days

Total

8

Last Release

1637d 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 (47 commits)")

---

Tags

jquerystatebootstrapcheckboxnullthreeindeterminate

### Embed Badge

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

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

###  Alternatives

[kartik-v/bootstrap-checkbox-x

An extended checkbox plugin for bootstrap with three states and additional styles.

921.0M1](/packages/kartik-v-bootstrap-checkbox-x)[kartik-v/yii2-widget-timepicker

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

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

474.3M8](/packages/kartik-v-yii2-widget-rating)[kartik-v/yii2-sortable

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

464.0M13](/packages/kartik-v-yii2-sortable)[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.6M13](/packages/kartik-v-yii2-widget-switchinput)[kartik-v/bootstrap-popover-x

Bootstrap Popover Extended - Popover with modal behavior, styling enhancements and more.

1163.6M3](/packages/kartik-v-bootstrap-popover-x)

PHPackages © 2026

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