Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/obregonco/yii2-semantic-ui

Semantic UI extension for Yii2
https://github.com/obregonco/yii2-semantic-ui

semantic semantic-ui yii yii-extension yii2 yii2-extension yii2-widgets

Last synced: about 1 month ago
JSON representation

Semantic UI extension for Yii2

Awesome Lists containing this project

README

        

# Yii2 Semantic UI extension

[Semantic UI](http://semantic-ui.com) extension for [Yii2](http://www.yiiframework.com)

## Installation

yii2-semantic-ui 2.* works with Semantic UI 2.*

### Composer

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

Either run

```
php composer.phar require obregonco/yii2-semantic-ui "~2"
```

or add

```
"obregonco/yii2-semantic-ui": "~2"
```

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

## Usage

Add SemanticUICSSAsset to AppAsset:

```php
set(\yii\grid\GridView::className(), \obregonco\SemanticUI\widgets\GridView::class);
Yii::$container->set(\yii\widgets\ActiveForm::className(), \obregonco\SemanticUI\widgets\ActiveForm::class);
Yii::$container->set(\yii\bootstrap\ActiveForm::className(), \obregonco\SemanticUI\widgets\ActiveForm::class);
Yii::$container->set(\yii\widgets\Breadcrumbs::className(), \obregonco\SemanticUI\collections\Breadcrumb::class);
Yii::$container->set(\yii\grid\CheckboxColumn::className(), \obregonco\SemanticUI\widgets\CheckboxColumn::class);
```

Be very careful with it.

## Examples

- Inside an `ActiveForm` object
```php
$form->field($model, 'username')->label(false)->textInput([
'autofocus' => true,
'placeHolder' => $model->getAttributeLabel('username'),
'uiOptions' => [
'appendTo' => '',
'class' => 'ui left icon input',
]
])

```

## Author
[Obregon.co](https://github.com/obregonco/)
[Ricardo O](https://github.com/robregonm/)

### Credits

Original maintainer [Aleksandr Zelenin](https://github.com/zelenin/)