Semantic UI Library for Yii2
, (*1)
This is the Semantic UI extension for Yii2. It encapsulates Semantic UI components and plugins in terms of Yii widgets
and helper classes, easing the usage of Semantic UI components/plugins into Yii applications., (*2)
Install
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
php composer.phar require --prefer-dist "2amigos/yii2-semantic-ui": "*"
or add, (*5)
"2amigos/yii2-semantic-ui": "*"
to the require section of your composer.json
file., (*6)
Usage
We are in the process of building a site for this extensions in the meantime, for example, making use of the Dropdown
module widget with a search-in menu feature is as follows:, (*7)
``` php
echo Dropdown::widget([
'encodeText' => false,
'text' => 'Filter posts',
'icon' => false,
'displaySearchInput' => true,
'encodeItemLabels' => false,
'items' => [
', (*8)
',
['label' => '
Important'],
['label' => '
Announcement']
],
'options' => [
'class' => 'floating labeled search icon button'
],
]
);
## Testing
To test the extension, is better to clone this repository on your computer. After, go to the extensions folder and do
the following (assuming you have `composer` installed on your computer:
``` bash
$ composer install --no-interaction --prefer-source --dev
Once all required libraries are installed then do:, (*9)
$ phpunit
You can also run tests for specific groups only:, (*10)
$ phpunit --group=helpers,modules
You can get a list of available groups via phpunit --list-groups
., (*11)
Contributing
Please see CONTRIBUTING for details., (*12)
Credits
License
The BSD License (BSD). Please see License File for more information., (*13)
web development has never been so fun
www.2amigos.us, (*14)