PHPackages                             loveorigami/yii2-bootstrap-toggle - 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. loveorigami/yii2-bootstrap-toggle

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

loveorigami/yii2-bootstrap-toggle
=================================

Yii2 bootstrap-toggle widget

1.1(10y ago)4201.4k↓50.8%9GPL-3.0+PHP

Since Aug 13Pushed 9y ago2 watchersCompare

[ Source](https://github.com/loveorigami/yii2-bootstrap-toggle)[ Packagist](https://packagist.org/packages/loveorigami/yii2-bootstrap-toggle)[ RSS](/packages/loveorigami-yii2-bootstrap-toggle/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Bootstrap Toggle widget for Yii 2
=================================

[](#bootstrap-toggle-widget-for-yii-2)

This extension provides the [Bootstrap-toggle](http://www.bootstraptoggle.com) integration for the Yii2 framework.

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

[](#installation)

This extension requires [Bootstrap-toggle](http://www.bootstraptoggle.com)

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

Either run

```
php composer.phar require --prefer-dist loveorigami/yii2-bootstrap-toggle "*"

```

or add

```
"loveorigami/yii2-bootstrap-toggle": "*"

```

to the require section of your composer.json.

General Usage
-------------

[](#general-usage)

```
use lo\widgets\Toggle;

Toggle::widget(
    [
        'name' => 'status', // input name. Either 'name', or 'model' and 'attribute' properties must be specified.
        'checked' => true,
        'options' => [], // checkbox options. More data html options [see here](http://www.bootstraptoggle.com)
    ]
)
```

or with active form as

```
