insolita/yii2-iconpicker Widget for bootstrap-iconpicker plugin http://victor-valencia.github.io/bootstrap-iconpicker/

bootstrappickericonsfontawesomeioniconglyphicon

Widget for bootstrap-iconpicker 3.0

Latest Stable Version Total Downloads License

Widget for bootstrap-iconpicker plugin http://victor-valencia.github.io/bootstrap-iconpicker/

Now based on more actual fork https://github.com/eliberty/bootstrap-iconpicker

FontAwesome 4.7.0 support

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist insolita/yii2-iconpicker "^3.0"

or add

"insolita/yii2-iconpicker": "^3.0"

to the require section of your composer.json file.

Requirements

This extension require twitter-bootstrap >3.0 You can use it for

By default - native bootstrap glyphicon

NOTE!

This extension not provide assets for icon source - you can setup and register it`s in view separately You can create needed assets, or direct include css of icon fonts from folder @bower/eliberty-bootstrap-iconpicker/icon-fonts

Usage

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

<?= $form->field($model, 'icon')->widget('\insolita\iconpicker\Iconpicker',
 [
   'iconset'=>'fontawesome',
   'clientOptions'=>['rows'=>8,'cols'=>10,'placement'=>'right'],
 ])->label('Choose icon'); ?>

or without ActiveForm

 <?php
    echo \insolita\iconpicker\Iconpicker::widget([
        'id'=>'choose_icon',
        'name'=>'myicon',
        'value'=>'glyphicon-cog',
        'iconset'=>'glyphicon',
        'pickerOptions'=>['class'=>'btn btn-primary'],
        'clientOptions'=>['placement'=>'bottom','search'=>false],
    ]);
 ?>

Changelog

CHANGELOG

3.0

2.0

  • Remove font-awesome depend
  • Use original bower component
  • remove $columns, $rows, $placement properties
  • add $clientOptions property with plugin configurations
  • remove $removePrefix property
  • add $onSelectIconCallback property for add custom javascript behavior after select icon

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



3.0.0 is the latest of 3 releases



MIT license
Stats
11 github stars & 9 github forks
2 downloads in the last day
115 downloads in the last 30 days
10094 total downloads