PHPackages                             dlds/yii2-infinite-scroll - 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. dlds/yii2-infinite-scroll

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

dlds/yii2-infinite-scroll
=========================

Yii2 extension for infinite-scroll jQuery plugin

0.2(11y ago)0944MITPHP

Since Apr 2Pushed 11y ago1 watchersCompare

[ Source](https://github.com/dlds/yii2-infinite-scroll)[ Packagist](https://packagist.org/packages/dlds/yii2-infinite-scroll)[ RSS](/packages/dlds-yii2-infinite-scroll/feed)WikiDiscussions master Synced 1mo ago

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

yii2-infinite-scroll
====================

[](#yii2-infinite-scroll)

Yii2 extension for infinite-scroll jQuery plugin, providing scrolling functionality for widgets such as `ListView`. It renders a hyperlink that leads to subsequent page of a target and registers infinite-scroll jQuery plugin which uses javascript to fetch and append content for subsequent pages, gracefully degrading to complete page reload when javascript is disabled.

Several behaviours allowing to customize scroll behavior are provided out of the box, including twitter-style manual trigger, local scroll in overflow div, masonry integration and others.

Resources
---------

[](#resources)

- Yii2 [extension page](http://www.yiiframework.com/extension/yii2-infinite-scroll)
- Infinite-Scroll jQuery plugin [documentation](https://github.com/paulirish/infinite-scroll)

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

[](#installation)

### Composer

[](#composer)

Add extension to your `composer.json` and update your dependencies as usual, e.g. by running `composer update`

```
{
    "require": {
        "dlds/yii2-infinite-scroll": "1.0.*@dev"
    }
}
```

\##Widget Configuration

In addition to most of the properties that `LinkPager` provides, this widget also allows you to configure:

- $widgetId *string* owner widget id, required
- $itemsCssClass *string* CSS class of a tag that encapsulates items, required
- $pluginOptions *array* infinite-scroll jQuery plugin options. For more information refer to infinite-scroll [documentation](https://github.com/paulirish/infinite-scroll)
- $contentLoadedCallback *string|JsExpression* javascript callback to be executed on loading the content via ajax call

\##Sample Usage

Plugin works by appending fetched items to the end of parent container, so it is required to configure `layout` property of parent `ListView` widget, wrapping `{items}` into e.g. `div` container with some class (to be used as a selector). It is possible to configure all selectors that widget initializes plugin with to fit your project requirements, but it general it is enough to set `itemCssClass` (class of that wrapping tag that we created) and `widgetId` (which would ensure multiple plugins on the same page would not conflict).

So the minimal required configuration would look like this:

```
echo ListView::widget([
    ...
    'id' => 'my-listview-id',
    'layout' => "{summary}\n{items}\n{pager}",
    'pager' => [
        'class' => InfiniteScrollPager::className(),
        'widgetId' => 'my-listview-id',
        'itemsCssClass' => 'items',
    ],
]);
```

An example illustrating how to customize some widget / plugin options:

```
echo ListView::widget([
    ...
    'id' => 'my-listview-id',
    'layout' => "{summary}\n{items}\n{pager}",
    'pager' => [
        'class' => InfiniteScrollPager::className(),
        'widgetId' => 'my-listview-id',
        'itemsCssClass' => 'items',
        'contentLoadedCallback' => 'afterAjaxListViewUpdate',
        'nextPageLabel' => 'Load more items',
        'linkOptions' => [
            'class' => 'btn btn-lg btn-block',
        ],
        'pluginOptions' => [
            'loading' => [
                'msgText' => "Loading next set of items...",
                'finishedMsg' => "No more items to load",
            ],
            'behavior' => InfiniteScrollPager::BEHAVIOR_TWITTER,
        ],
    ],
]);
```

\##License

Extension is released under MIT license, same as underlying jQuery plugin.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Total

2

Last Release

4055d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/23f0d05bb48111bd348c97af007c453b374ba03c36ec4fd114dfd73896bf5958?d=identicon)[dlds](/maintainers/dlds)

---

Top Contributors

[![nirvana-msu](https://avatars.githubusercontent.com/u/5787387?v=4)](https://github.com/nirvana-msu "nirvana-msu (5 commits)")[![jirisvoboda](https://avatars.githubusercontent.com/u/10264326?v=4)](https://github.com/jirisvoboda "jirisvoboda (1 commits)")[![svobik7](https://avatars.githubusercontent.com/u/761766?v=4)](https://github.com/svobik7 "svobik7 (1 commits)")

---

Tags

pluginjqueryyii2widgetinfinite-scroll

### Embed Badge

![Health badge](/badges/dlds-yii2-infinite-scroll/health.svg)

```
[![Health](https://phpackages.com/badges/dlds-yii2-infinite-scroll/health.svg)](https://phpackages.com/packages/dlds-yii2-infinite-scroll)
```

###  Alternatives

[kartik-v/yii2-widget-timepicker

Enhanced Yii2 wrapper for the bootstrap timepicker plugin (sub repo split from yii2-widgets)

404.9M14](/packages/kartik-v-yii2-widget-timepicker)[kartik-v/yii2-widget-sidenav

An enhanced side navigation menu styled for bootstrap (sub repo split from yii2-widgets)

364.0M8](/packages/kartik-v-yii2-widget-sidenav)[kartik-v/yii2-widget-colorinput

An enhanced Yii 2 widget encapsulating the HTML 5 color input (sub repo split from yii2-widgets)

324.8M10](/packages/kartik-v-yii2-widget-colorinput)[nullref/yii2-datatables

Yii2 Extension for DataTables jQuery plug-in

7290.3k](/packages/nullref-yii2-datatables)[kartik-v/yii2-widget-spinner

A widget to render animated CSS3 loading spinners with VML fallback for IE (sub repo split from yii2-widgets)

283.9M3](/packages/kartik-v-yii2-widget-spinner)[kartik-v/yii2-widget-affix

A scrollspy and affixed enhanced navigation to highlight page sections (sub repo split from yii2-widgets)

153.8M3](/packages/kartik-v-yii2-widget-affix)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
