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

https://github.com/thtmorais/yii2-dropdown

Dropdown button - Dynamic change actions for Yii PHP Framework
https://github.com/thtmorais/yii2-dropdown

button dropdown dropdown-button droplab yii2 yii2-extension yii2-framework yii2-widgets

Last synced: 3 months ago
JSON representation

Dropdown button - Dynamic change actions for Yii PHP Framework

Awesome Lists containing this project

README

        

Dropdown button - Dynamic change actions for Yii PHP Framework
==============================================================
Dropdown button - Dynamic change actions for Yii PHP Framework

Installation
------------

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

Either run

```shell
composer require thtmorais/yii2-dropdown "*"
```

or add

```json
"thtmorais/yii2-dropdown": "*"
```

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

Usage
-----

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

```php
= Dropdown::widget([
'dropdownToggleClass' => 'btn btn-lg btn-success',
'main' => [
'id' => 'getStartedWithYii',
'href' => 'http://www.yiiframework.com/',
'class' => 'btn btn-lg btn-success',
'text' => 'Get started with Yii'
],
'subordinate' => [
[
'id' => 'yiiDocumentation',
'href' => 'http://www.yiiframework.com/doc/',
'text' => 'Yii Documentation'
],
[
'id' => 'yiiForum',
'href' => 'http://www.yiiframework.com/forum/',
'text' => 'Yii Forum'
],
[
'id' => 'yiiExtensions',
'href' => 'http://www.yiiframework.com/extensions/',
'text' => 'Yii Extensions'
]
],
'options' => [
'id' => 'group-dropdown',
'class' => 'p-1'
]
]) ?>
```

Example being executed
-----

![dropdown](https://raw.github.com/thtmorais/yii2-dropdown/main/images/dropdown.gif?raw=true)