kr0lik/yii2-fontawesome-iconpicker

Yii2 input widget for fontawesome 5 iconpicker

Installs: 1 178

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

dev-master 2018-05-22 13:48 UTC

This package is auto-updated.

Last update: 2020-03-16 12:01:36 UTC


README

Yii2 iconpicker for fontawesome5

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist kr0lik/yii2-fontawesome-iconpicker "dev-master"

or add

"yii2-fontawesome-iconpicker": "dev-master"

to the require section of your composer.json file.

Usage

iconpicker used font-awesome5 icons

In view:

<?php
use kr0lik\fontawesomeiconpicker\FontAwesomeIconPicker;
?>

<?php $form = ActiveForm::begin(); ?>
    <?= $form->field($model, "icon")->widget(FontAwesomeIconPicker::class) ?>
<?php ActiveForm::end(); ?>

Options available:

  • containerOptions - Array the HTML attributes for the widget container tag

  • pickerOptions - Options for iconpicker. Options must be set as data-attributes.

  • defaultIcon - Default: 'fa fa-ellipsis-h'