grptx/yii2-smooth-scroll

Smooth Scroll widget for Yii2

Installs: 224

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-widget

v2.0.0 2019-06-23 09:29 UTC

This package is auto-updated.

Last update: 2024-04-18 21:58:26 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock

Smooth Scroll component for Yii2 based on Smooth Scroll library

Install

Preferred way to install is through Composer:

php composer.phar require grptx/yii2-smooth-scroll:^1

Or, you may add

"grptx/yii2-smooth-scroll": "^1"

to the require section of your composer.json file and execute php composer.phar update.

Usage

To add the smooth scroll capability to a page add in the view:

use grptx\smoothscroll\SmoothScrollWidget;

SmoothScrollWidget::widget();

Options

Availables options for the widget are:

Example

SmoothScrollWidget::widget([
    'selector' => 'a[href*="#"]',
    'name' => 'myScroll',
    'options' => [
        'header' => ...
        'speed' => ...
        // etc ..
    ],
]);