Created with StackBlitz ⚡️

Overview

React Pagination

This project supports two kinds of APIs

usePagination

A custom hook that returns you the pagination data which can then be used to create a customized component

Pagination

A React component that renders the Pagination component and supports previous and next arrow buttons

Edit on StackBlitz ⚡️

You might also like...

This website was designed to allow viewers complete access to all movie and tv series trailers. It was created using React + MUI

This website was designed to allow viewers complete access to all movie and tv series trailers. It was created using React + MUI

Trailer - Time 👾 Demo https://trailer-time.netlify.app/ 🎯 about This project is a simplified front end clone of some movie webside (like Netflix/Hul

Aug 24, 2022

This project is a Vegan recipe application. I created with React Native. Check out VeganRecipe now for recipe app

This project is a Vegan recipe application. I created with React Native. Check out VeganRecipe now for recipe app

VeganRecipe 🍆 🍄 🍠 🍅 Hello! This project is a Vegan recipe application. I created with React Native. Check out VeganRecipe now for recipe app. 🍆 ?

Mar 27, 2022

Project created in the React immersion with @Alura and teachers @omariosouto @peas

Project created in the React immersion with @Alura and teachers @omariosouto @peas

Project created in the React immersion with @Alura and teachers @omariosouto @peas

Jan 28, 2022

A simple Todo-List app created using React

A simple Todo-List app created using React

TodoLst-UsingReact This is a simple Todo-List app created using React, it performs operations like, allowing users to input list of todos, edit a todo

Mar 11, 2022

An inventory and financial control system created in Next.js and Redux

An inventory and financial control system created in Next.js and Redux

An inventory and financial control system created in Next.js and Redux

Nov 10, 2022

Backend postgreSQL created from scratch, 4-person team, 2 day-sprint.

Backend postgreSQL created from scratch, 4-person team, 2 day-sprint.

backend-bookstore Created a backend bookstore API from scratch. Project and testing created vertically. Created BY Michelle Nygren GitHub: https://git

Mar 25, 2022

Project created with the saga of courses in Platzi, consuming the API of themoviedb.org

Movie App created with the saga of courses in Platzi, consuming the API of themoviedb.org Possible Improvements Rate the movie: https://developers.the

Dec 4, 2022

Created with StackBlitz ⚡️

electron-quick-start Clone and run for a quick way to see Electron in action. This is a minimal Electron application based on the Quick Start Guide wi

Oct 12, 2021

Created with StackBlitz ⚡️

Qwik App ⚡️ Qwik Docs Discord Qwik Github @QwikDev Vite Partytown Mitosis Builder.io Project Structure Inside of you project, you'll see the following

Nov 17, 2022

The Swiss Army Knife of Vector Graphics Scripting – Scriptographer ported to JavaScript and the browser, using HTML5 Canvas. Created by @lehni & @puckey

Paper.js - The Swiss Army Knife of Vector Graphics Scripting If you want to work with Paper.js, simply download the latest "stable" version from http:

Dec 30, 2022

Created from react styleguidist for Vue Components with a living style guide

Created from react styleguidist for Vue Components with a living style guide

Isolated Vue component development environment with a living style guide Start documenting now on codesandbox.io Sponsors A big thank you to our spons

Dec 28, 2022

A responsive, Bootstrap landing page template created by Start Bootstrap

A responsive, Bootstrap landing page template created by Start Bootstrap

Start Bootstrap - Landing Page Landing Page is a multipurpose landing page template for Bootstrap created by Start Bootstrap. Preview View Live Previe

Jan 3, 2023

A web app landing page theme created by Start Bootstrap

A web app landing page theme created by Start Bootstrap

Start Bootstrap - New Age New Age is a web app landing page theme for Bootstrap created by Start Bootstrap. Preview View Live Preview Status Download

Dec 26, 2022

A simple, one page, Bootstrap HTML website template created by Start Bootstrap

A simple, one page, Bootstrap HTML website template created by Start Bootstrap

Start Bootstrap - One Page Wonder One Page Wonder is a basic one page template for Bootstrap created by Start Bootstrap. Preview View Live Preview Sta

Dec 18, 2022

A shop homepage Bootstrap HTML template created by Start Bootstrap

A shop homepage Bootstrap HTML template created by Start Bootstrap

Start Bootstrap - Shop Homepage Shop Homepage is a basic HTML online store homepage template for Bootstrap created by Start Bootstrap. Preview View Li

Jan 1, 2023

A Bootstrap HTML business homepage template created by Start Bootstrap

A Bootstrap HTML business homepage template created by Start Bootstrap

Start Bootstrap - Business Frontpage Business Frontpage is a basic business website template for Bootstrap created by Start Bootstrap. Preview View Li

Nov 28, 2022

A Bootstrap HTML homepage template with feature boxes - created by Start Bootstrap

A Bootstrap HTML homepage template with feature boxes - created by Start Bootstrap

Start Bootstrap - Heroic Features Heroic Features is a multipurpose HTML template for Bootstrap created by Start Bootstrap. Preview View Live Preview

Nov 27, 2022

Deploying a React App (created using create-react-app) to GitHub Pages

Deploying a React App* to GitHub Pages * created using create-react-app Introduction In this tutorial, I'll show you how I deployed a React app—which

Dec 31, 2022

A Full Stack Amazon Clone which created using ReactJS with full E-Commerce Functionality!!

Amazon Clone with ReactJS A small web app that tries to imitate the desktop web version of amazon site, you can add items to the basket, delete them,

Oct 3, 2022
Comments
  • Opening of a new page

    Opening of a new page

    Hello Shubham !

    I have found and used your pagination component in my own React app and it works just fine. But there is still a little problem and I need your help.

    Imagine the use case below : At the top of the page, I have the "Pagination" component. Then, my page size is 30, so I have 30 "cards" of my data. And then, at the bottom of the page, a new time the "Pagination" component.

    The problem is : When I use "setCurrentPage" from the prop "onPageChange" in the second pagination component, the new page is opened at the bottom, that is to say at the same level in the page than the previous page.

    How could I do to make it open at the top of the page or at any other place with an anchor, for example ? It's not as simple as basic HTML !!

    Thanks in advance for the answer you can bring.

    Jérôme Fromantin, French front-end junior developer.

    opened by Jerome-Fromantin 0
  • Convert to NPM package

    Convert to NPM package

    This version is almost ready to be published as a NPM package, all we need is a unique name for it and some content changes in package.json and README.md files.

    TODO

    Things to do in package.json:

    • change name field
    • add description field
    • change urls in repository, bugs and homepage fields

    Things to do in README.md:

    • replace package-name with an actual name

    Usage

    1. Clone this repo
    2. Install dependencies with npm install
    3. Build src/script.ts file with npm run build
    4. Run npm link
    5. Create a new React project and navigate to its directory
    6. Run npm link react-pagination
    7. To unlink, simply run npm unlink react-pagination
    opened by rago4 0
  • Accessibility and Keyboard Navigation

    Accessibility and Keyboard Navigation

    Issue — Accessbility

    I did a lot of research before building my own pagination for AgnosticUI and appreciated your article and this example among the many other resources available on this interesting topic. I realize it takes a lot of time to write this sort of article and it's deeply appreciated!

    I do have an issue to report — the fact that this implementation doesn't support either: 1) tab into and across the paging links, or 2) tab into and then arrow across the links (I believe both are acceptable a11y) is problem since it's likely a "first-stop" to many electing to give custom pagination a go. We have a problem in our industry where keyboard navigation and accessibility concerns are tackled as an after thought already; so if the tutorial and this repo could include keyboard navigation it would help so much in pointing FE devs in the right direction in my opinion.


    Examples

    Here's an example implementation that allows you to tab into the paging controls, and then arrow key through them https://garden.zendesk.com/components/pagination

    Here's another example from my library that uses buttons (and so I got tab into and through for free):

    This version of the pagination component is a work-in-progress so I unfortunately cannot point you to a live example but you can see the focus ring is updated on tab per the screen grab below:

    Screen Shot 2021-12-26 at 10 34 55 PM

    Again, thank you so much for your help in writing the tutorial and keeping this repository open and available to the community! It would be great if you could write a part II on how to make this pagination component a11y-compliant and fully inclusive (either via use of buttons or keyup management).

    opened by roblevintennis 0
Owner
Shubham Khatri
Sr Frontend Developer at Flock | Passionate about Javascript, React and Web Development | Active Stackoverflow contributor
Shubham Khatri
Work from is a web app created by Josh Cawthorne for the Supabase Hackathon.

Work From What is Work From? Work from is a web app created by Josh Cawthorne for the Supabase Hackathon. The concept of the app is for companies to b

Josh Cawthorne 86 Jan 3, 2023
This app simulates a simple bookstore, and it was created using ReactJS and Redux.

Bookstore About The Bookstore is a website similar to the "Awesome Books" website built in the previous Microverse module (see live version). My goal

Enio N. de Souza 6 Oct 3, 2021
A chat application created using React,js and Chat Engine

⭐️ Chat-App ⭐️ A Chat Application created using React.js and Chat Engine Live Site Getting Started with Create React App This project was bootstrapped

Supuni Eleesha Randeniya 1 Dec 15, 2022
This is a movie app project using imdb database created by nextjs and tailwind css.

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Sahand Ghavidel 1 Dec 24, 2021
This is a movie app created by next.js and tailwind css using imdb database.

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Sahand Ghavidel 1 Dec 26, 2021
A hook based project created during 20-Dec week ReactJS workshop

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Nabendu 1 Dec 25, 2021
Airbnb-React - In this project, An Airbnb experience page clone is created to learn and implement React props concepts.

Create React Airbnb App In this project An airbnb experience page clone is created to learn and implement React props concepts. Objectives Learn about

Yogesh Gurjar 4 Jun 28, 2022
Hacker-news-with-react - 👾 Consuming the hacker news api, i created a more modern design for than the current site.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

João Thomaz 1 Jan 3, 2022
This simple tic-tac-toe game is created by following the react documentation. and there's some modifications on it.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Kesara Karannagoda 1 Dec 29, 2022
During work. Second team project created during CodersCamp 2021/2022 by a 6-person team.

BoardMap Status: Work in progress. Work on the project started on 10-01-2021. Our Crew Mentor: Piotr Rynio Agnieszka Przybyłowska Patryk Święcicki Rad

Piotr Rynio 3 Mar 21, 2022