Baron — a small, fast and crossbrowser custom scrollbar with native system scroll mechanic., (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require kl83/yii2-baron-scrollbar *
or add, (*4)
"kl83/yii2-baron-scrollbar": "*"
to the require section of your composer.json file., (*5)
Usage
<?php \kl83\widgets\Scrollbar::begin([
'theme' => \kl83\widgets\Scrollbar::THEME_MACOSX,
'options' => [
'style' => 'height: 30vh',
],
'baronOptions' => [
'cssGuru' => false,
],
]); ?>
<p>Some scrollable content...</p>
<p>Height of parent DOM element must be set.</p>
<?php \kl83\widgets\Scrollbar::end(); ?>
License
MIT License, (*6)