npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sio-group/ui-pagination

v0.1.4

Published

[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC) ![npm](https://img.shields.io/npm/v/@sio-group/ui-pagination) ![TypeScript](https://img.shields.io/badge/types-Yes-brightgreen)

Readme

@sio-group/ui-pagination

License: ISC npm TypeScript

A flexible and accessible pagination component for React applications. Supports page-window rendering with ellipsis, result range info, and full keyboard accessibility — with no dependencies beyond React.


Features

  • 🔢 Smart page window – Shows a configurable window of pages around the current page with ellipsis
  • Accessible – Full aria-label support and semantic markup
  • 🎨 Custom styling – Supports custom classes and inline styles
  • 🔧 Composable – Use the windowSize utility to build your own UI
  • 📦 Zero dependencies – No third-party pagination library required

Installation

npm install @sio-group/ui-pagination

Peer dependencies

This package requires:

  • react ^19.0.0
  • react-dom ^19.0.0

Quick Example

import { Pagination } from "@sio-group/ui-pagination";

function Example() {
    return (
        <Pagination
            from={1}
            to={20}
            total={240}
            pageCount={12}
            currentPage={1}
            onPaginate={(page) => fetchPage(page)}
        />
    );
}

Styling

Import the base pagination styles:

import "@sio-group/ui-pagination/sio-pagination-style.css";

Basic Usage

import { Pagination } from "@sio-group/ui-pagination";

function App() {
    const [currentPage, setCurrentPage] = useState(1);

    return (
        <Pagination
            from={1}
            to={20}
            total={240}
            pageCount={12}
            currentPage={currentPage}
            onPaginate={setCurrentPage}
        />
    );
}

This renders a full pagination bar:

1 - 20 van 240     ‹ vorige  [1] [2] [3] ... [12]  volgende ›

API Reference

Pagination Props

| Prop | Type | Default | Description | |---------------|---------------------------|---------|----------------------------------------------------| | currentPage | number | — | The currently active page (1-based) | | pageCount | number | — | Total number of pages | | from | number | — | First item of the current page | | to | number | — | Last item of the current page | | total | number | — | Total number of items across all pages | | onPaginate | (page: number) => void | — | Called with the new page number on navigation | | windowSize | number | 2 | Number of pages shown left and right of current | | className | string | — | Additional CSS classes for the pagination wrapper | | style | CSSProperties | — | Inline styles for the pagination wrapper |


Window Size

The windowSize prop controls how many page buttons are shown around the current page.

// Default (windowSize=2): 1 ... 4 5 [6] 7 8 ... 24
<Pagination windowSize={2} ... />

// Compact (windowSize=1): 1 ... 5 [6] 7 ... 24
<Pagination windowSize={1} ... />

This is useful for adapting the pagination to different screen sizes or container widths.


TypeScript

This package includes full TypeScript definitions.

import { Pagination, PaginationProps, getPaginationWindow, PageItem } from "@sio-group/ui-pagination";

Browser Support

This package supports all modern browsers that support:

  • ES6 modules
  • React 19

Contributing

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

License

This project is licensed under the ISC License - see the LICENSE file for details.