The Sidr widget is a wrapper around the Sidr jQuery plugin,
for creating side menus and "the easiest way for doing your menu responsive"., (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist raoul2000/yii2-sidr-widget "*"
or add, (*4)
"raoul2000/yii2-sidr-widget": "*"
to the require section of your composer.json
file., (*5)
Usage
Using Sidr widget is easy. For example :, (*6)
<button id="open-menu">open/close Menu</button>
<header id="demoheader">
<h1>Demos & Usage</h1>
</header>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Quasi nihil ab possimus temporibus
illum ullam molestiae aliquam maiores .
, (*7)
= Sidr::widget([
'selector' => '#open-menu',
'pluginOptions' => [
'name' => 'sidr-menu',
'source' => '#demoheader, #demo-content',
'onClose' => new yii\web\JsExpression('
function() {
alert("bye bye side menu !");
}
')
]
]); ?>
For more information on the plugin options, please refer to Sidr github page., (*8)
Alternative
License
yii2-sidr-widget is released under the BSD 3-Clause License. See the bundled LICENSE.md
for details., (*9)