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

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mrshanebarron/infinite-scroll
=============================

Infinite scroll component for Laravel - supports Livewire and Vue

v1.0.4(4mo ago)013MITPHPPHP ^8.1

Since Dec 14Pushed 4mo agoCompare

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

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

Infinite Scroll
===============

[](#infinite-scroll)

An infinite scrolling component for Laravel applications. Automatically loads more content as user scrolls. Works with Livewire and Vue 3.

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

[](#installation)

```
composer require mrshanebarron/infinite-scroll
```

Livewire Usage
--------------

[](#livewire-usage)

### Basic Usage

[](#basic-usage)

```

    @foreach($items as $item)
        {{ $item->title }}
    @endforeach

```

### Livewire Props

[](#livewire-props)

PropTypeDefaultDescription`loading`boolean`false`Currently loading`no-more`boolean`false`No more items`threshold`number`100`Scroll threshold in px`root-margin`string`'100px'`IntersectionObserver marginVue 3 Usage
-----------

[](#vue-3-usage)

### Setup

[](#setup)

```
import { SbInfiniteScroll } from './vendor/sb-infinite-scroll';
app.component('SbInfiniteScroll', SbInfiniteScroll);
```

### Basic Usage

[](#basic-usage-1)

```

      {{ item.title }}

import { ref } from 'vue';

const items = ref([]);
const loading = ref(false);
const noMore = ref(false);
const page = ref(1);

const loadMore = async () => {
  loading.value = true;

  const response = await fetch(`/api/items?page=${page.value}`);
  const data = await response.json();

  items.value.push(...data.items);
  noMore.value = data.items.length === 0;
  page.value++;
  loading.value = false;
};

// Initial load
loadMore();

```

### Feed Example

[](#feed-example)

```

        {{ post.title }}
        {{ post.excerpt }}

          Loading more posts...

          You've reached the end!

```

### Vue Props

[](#vue-props)

PropTypeDefaultDescription`loading`Boolean`false`Loading state`noMore`Boolean`false`No more items to load`threshold`Number`100`Scroll threshold`rootMargin`String`'100px'`Observer margin### Events

[](#events)

EventPayloadDescription`load-more`-Triggered when scroll reaches threshold### Slots

[](#slots)

SlotDescriptiondefaultContent items`loading`Custom loading indicator`no-more`End of list messageFeatures
--------

[](#features)

- **Intersection Observer**: Efficient scroll detection
- **Loading State**: Shows spinner while loading
- **End Detection**: Displays message when no more items
- **Customizable**: Custom loading and end slots
- **Preloading**: Configurable load threshold

Styling
-------

[](#styling)

Uses Tailwind CSS:

- Spinner animation
- Centered loading/end messages
- Gray text for status

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12
- Tailwind CSS 3.x

License
-------

[](#license)

MIT License

###  Health Score

36

—

LowBetter than 81% of packages

Maintenance79

Regular maintenance activity

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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 ~0 days

Total

5

Last Release

144d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a38dc9b4ccc180ee3e9df8879f8747ea9dbf36812c6546827fe504fa8993eb8?d=identicon)[mrshanebarron](/maintainers/mrshanebarron)

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M683](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M157](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M210](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M858](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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