srdjan92 / yii2-floating-menu
Floating menu with expand/collapse ability depending what is needed in specific case.
Installs: 264
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2025-05-11 15:58:13 UTC
README
Floating menu positioned at the left side of page with expand/collapse ability depending what is needed in specific case.
Instalation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist srdjan92/yii2-floating-menu "^1.0.0"
or add
"srdjan92/yii2-floating-menu": "^1.0.0"
to the require section of your composer.json
file.
Usage
<?php // basic example of floating widget echo \srdjan\floatingmenu\FloatingMenu::widget([ 'toggleOptions' => [ 'collapseOptions' => ['class' => 'fal fa-arrow-alt-left'], 'expandOptions' => ['class' => 'fal fa-arrow-alt-right'] ], 'items' => [ [ 'url' => ['site/index'], 'label' => "<i class='fal fa-envelope'></i> <span>Messages</span>" ], [ 'url' => ['/notification/index'], 'label' => "<i class='fal fa-bell'></i> <span>Notifications</span>" ], [ 'url' => ['/account/profile'], 'label' => "<i class='fal fa-user'></i> <span>Profile</span>" ], [ 'url' => ['/settings/disapprove'], 'label' => "<i class='fal fa-users'></i> <span>Fans</span>" ], [ 'url' => ['/settings/approve'], 'label' => "<i class='fal fa-user'></i> <span>Club</span>" ], [ 'url' => ['/settings/index'], 'label' => "<i class='fal fa-cog'></i> <span>Settings</span>" ], ] ]); ?>
In example above are used fontawesome icons, feel free to use any icon library that fit your needs. Floating widget library does not have dependency on any icon library.