PHPackages                             hybridmind/pagination - 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. hybridmind/pagination

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

hybridmind/pagination
=====================

A lightweight pagination library

1.0.0(1y ago)04MITPHP

Since Dec 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/HybridMind1337/Pagination)[ Packagist](https://packagist.org/packages/hybridmind/pagination)[ RSS](/packages/hybridmind-pagination/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Hybrid Pagination
=================

[](#hybrid-pagination)

Hybird Pagination is a modern, lightweight PHP library for generating paginated content. Designed with flexibility in mind, it supports AJAX-based pagination, Bootstrap styling, Font Awesome icons, and customizable configurations to suit your needs.

---

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

[](#requirements)

- **PHP 7.4 or higher**: The library leverages modern PHP features.
- **Composer**: For dependency management.
- **Bootstrap (optional)**: For styling the pagination output.
- Font Awesome (optional)\*\*: If you prefer using Font Awesome icons.

---

Features
--------

[](#features)

- **AJAX Support**: Seamlessly integrates AJAX for smooth, page-less navigation.
- **Bootstrap Compatibility**: Fully compatible with Bootstrap's pagination styles.
- **Font Awesome Icons**: Includes beautiful icons for navigation.
- **Customizable**: Easily customize labels, tooltips, and display options.
- **Responsive Design**: Pagination adapts to different screen sizes.

---

Usage
-----

[](#usage)

Here’s a basic example:

```
require __DIR__ . '/vendor/autoload.php';

use HybridMind\Pagination;

$pagination = new Pagination([
    'showFirstLast' => true,
    'dots' => true,
    'useIcons' => true,
    'tooltip' => true,
    'useAjax' => true,
    'containerId' => 'content-container',
]);

echo $pagination->renderPagination($currentPage, $totalPages, '/example');
```

If you need to integrate AJAX with server-side content dynamically generated from a database, you can follow this pattern:

```
use HybridMind\Pagination;

// Simulating database pagination
$currentPage = $_GET['page'] ?? 1;
$perPage = 10;
$totalItems = 100; // Replace with actual count from database
$totalPages = ceil($totalItems / $perPage);

$pagination = new Pagination([
    'showFirstLast' => true,
    'dots' => true,
    'useIcons' => true,
    'useAjax' => true,
    'containerId' => 'content-container',
]);

echo $pagination->renderPagination($currentPage, $totalPages, '/ajax-endpoint');
```

```
function ajaxPagination(url, containerId) {
    fetch(url)
        .then(response => response.text())
        .then(html => {
            document.querySelector(`#${containerId}`).innerHTML = html;
        })
        .catch(error => console.error('Error:', error));
}
```

---

Options
-------

[](#options)

You can customize the pagination by passing an array of options to the `Pagination` class. Below is the list of available options:

OptionTypeDefaultDescription`showFirstLast`boolean`true`Show buttons for the first and last pages.`dots`boolean`true`Show "..." between page ranges when applicable.`useIcons`boolean`false`Use text-based icons (e.g., ``) for navigation.`tooltip`boolean`true`Add tooltips to the navigation buttons (e.g., "Page 1").`useAjax`boolean`false`Enable AJAX pagination (requires JavaScript).`containerId`string`'pagination-container'`The ID of the container to update when using AJAX.---

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

[](#installation)

Install via [Composer](https://getcomposer.org/):

```
composer require hybridmind/pagination
```

---

License
-------

[](#license)

This project is licensed under the MIT License - feel free to use it in your personal or commercial projects.

---

Contributing
------------

[](#contributing)

Contributions are welcome! If you have ideas or find bugs, feel free to open an issue or submit a pull request.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

526d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fbb6b2beb5e0939710efaeb5c95001163a5b48ddf2082e232179b75a55c22264?d=identicon)[hybridmind](/maintainers/hybridmind)

---

Top Contributors

[![HybridMind1337](https://avatars.githubusercontent.com/u/12223569?v=4)](https://github.com/HybridMind1337 "HybridMind1337 (7 commits)")

### Embed Badge

![Health badge](/badges/hybridmind-pagination/health.svg)

```
[![Health](https://phpackages.com/badges/hybridmind-pagination/health.svg)](https://phpackages.com/packages/hybridmind-pagination)
```

PHPackages © 2026

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