PHPackages                             jkofsky/yii2-scroll-top - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jkofsky/yii2-scroll-top

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

jkofsky/yii2-scroll-top
=======================

This Yii 2 widget adds a simple scroll-to-top button to your site.

v0.9.0(8y ago)038BSD-3-ClausePHP

Since Jul 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jkofsky/yii2-scroll-top)[ Packagist](https://packagist.org/packages/jkofsky/yii2-scroll-top)[ RSS](/packages/jkofsky-yii2-scroll-top/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

yii2-scroll-top
===============

[](#yii2-scroll-top)

This Yii 2 widget adds a simple scroll-to-top button to your site. It uses a glyphicon, some CSS and the .animate jQuery function. All these are part of Yii 2 by default so no other dependencies are required.

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist jkofsky/yii2-scroll-top "*"

```

or add

```
"jkofsky/yii2-scroll-top": "*"

```

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

How to use
----------

[](#how-to-use)

Add this line to your main layout so the widget gets loaded automatically into every page.

```

```

or

```
