Skip to content

oakcms/yii2-bootstrap-switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bootstrap Switch Widget for Yii2

Renders a Bootstrap Toggle Switch plugin widget.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist oakcms/yii2-bootstrap-switch "*"

or add

"oakcms/yii2-bootstrap-switch": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= $form->field($model, 'field')->widget(\oakcms\bootstrapswitch\Switcher::className()) ?>

Or

<?= \oakcms\bootstrapswitch\Switcher::widget([
    'name' => 'Name',
    'checked' => true,
    'clientOptions' => [
        'size' => 'large',
        'onColor' => 'success',
        'offColor' => 'danger'
    ]
]); ?>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages