PHPackages                             justinvoelker/yii2-awesomebootstrapcheckbox - 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. justinvoelker/yii2-awesomebootstrapcheckbox

ActiveYii2-extension

justinvoelker/yii2-awesomebootstrapcheckbox
===========================================

Better looking, bootstrap-style checkboxes and radio buttons

1.0.1(11y ago)110.9k↓50%3BSD-3-ClauseCSS

Since Feb 28Pushed 9y ago2 watchersCompare

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

READMEChangelogDependencies (1)Versions (3)Used By (0)

\#Awesome Bootstrap Checkbox for Yii2

Implementation of [Awesome Bootstrap Checkbox](https://github.com/flatlogic/awesome-bootstrap-checkbox/) within Yii2.

This extension overrides the ActiveField functions of `checkbox`, `radio`, `checkboxList`, and `radioList`.

Additionally, `CheckboxColumn` is included to implement the same awesome checkboxes in a GridView widget.

\##Installation

\###Install the extension

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

Either run

```
php composer.phar require --prefer-dist justinvoelker/yii2-awesomebootstrapcheckbox "*"

```

or add

```
"justinvoelker/yii2-awesomebootstrapcheckbox": "*"

```

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

### Styles

[](#styles)

Follow one of the directions below to use the styles necessary for awesome bootstrap checkboxes

#### Option 1: Manually combine stylesheets

[](#option-1-manually-combine-stylesheets)

Open your the `vendors\justinvoelker\yii2-awesomebootstrapcheckbox\css` directory and add the appropriate styles to your own stylesheet or include them in your less/scss files.

#### Option 2: Include the delivered asset bundle

[](#option-2-include-the-delivered-asset-bundle)

Add `justinvoelker\awesomebootstrapcheckbox\Asset` as a dependency in your `assets\AppAsset` file. It should look similar to the following:

```
public $depends = [
    'yii\web\YiiAsset',
    'yii\bootstrap\BootstrapAsset',
    'justinvoelker\awesomebootstrapcheckbox\Asset',
];
```

\##Usage

\###ActiveField

To use awesome bootstrap checkboxes in your ActiveForm, simply specify the `fieldClass` property of the ActiveForm as follows:

```
$form = ActiveForm::begin([
    'fieldClass' => 'justinvoelker\awesomebootstrapcheckbox\ActiveField',
]);
```

Once the fieldClass is specified simply use checkbox, radio, checkboxList, or radioList as needed. The following are some examples of usage.

```
// Disabled checkbox with a customized label
$form->field($model, 'attribute')->checkbox(['label' => 'You cannot check this checkbox', 'disabled'=>true])

// Radio with the bootstrap primary color
$form->field($model, 'attribute')->radio(['divOptions' => ['class' => 'checkbox-primary']])

// List of disabled checkboxes
$form->field($model, 'attribute')->checkboxList([1 => 'First', 2 => 'Second', 3 => 'Third'], ['itemOptions' => ['disabled' => true]])

// Inline list of enabled radio buttons with the bootstrap danger color
$form->field($model, 'attribute')->inline()->radioList([1 => 'First', 2 => 'Second', 3 => 'Third'], ['itemOptions' => ['disabled' => false, 'divOptions' => ['class' => 'radio-danger']]])
```

Keep in mind that at times there are essentially two labels for a given input: one for the entire field, one for that specific checkbox or radio button. Specifying a label() will set the label for the entire field, specifying the `label` itemOption will change the label for a single checkbox() or radio() button.

\###CheckboxColumn

To create a php array of key=&gt;value pairs (where key is the tag and value is the frequency of that tag), use TaggingQuery:

```
'columns' => [
    // ...
    [
        'class' => 'justinvoelker\awesomebootstrapcheckbox\CheckboxColumn',
        // you may configure additional properties here
    ],
]
```

An example of an additional property could be to limit the width of the checkbox column: `'contentOptions' => ['style' => 'width: 25px;'],`

\##Credits [Awesome Bootstrap Checkbox](https://github.com/flatlogic/awesome-bootstrap-checkbox/)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

4074d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/250c304267e68b69e45180f9863c1ff7578780afae46e118be7b3ff71de72a9b?d=identicon)[justinvoelker](/maintainers/justinvoelker)

---

Top Contributors

[![justinvoelker](https://avatars.githubusercontent.com/u/2441889?v=4)](https://github.com/justinvoelker "justinvoelker (2 commits)")

---

Tags

bootstrapcheckboxradio

### Embed Badge

![Health badge](/badges/justinvoelker-yii2-awesomebootstrapcheckbox/health.svg)

```
[![Health](https://phpackages.com/badges/justinvoelker-yii2-awesomebootstrapcheckbox/health.svg)](https://phpackages.com/packages/justinvoelker-yii2-awesomebootstrapcheckbox)
```

###  Alternatives

[wenzhixin/bootstrap-table

An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)

11.8k283.4k1](/packages/wenzhixin-bootstrap-table)[yiisoft/yii2-bootstrap

The Twitter Bootstrap extension for the Yii framework

19819.6M1.0k](/packages/yiisoft-yii2-bootstrap)[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)[yiisoft/yii2-bootstrap5

The Twitter Bootstrap v5 extension for the Yii framework

661.4M121](/packages/yiisoft-yii2-bootstrap5)[kartik-v/yii2-checkbox-x

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

26987.3k11](/packages/kartik-v-yii2-checkbox-x)[vsn4ik/bootstrap-checkbox

A checkbox component based on Bootstrap framework

2109.0k3](/packages/vsn4ik-bootstrap-checkbox)

PHPackages © 2026

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