Socket
Book a DemoInstallSign in
Socket

react-hot-pagination

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hot-pagination

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> [![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-) <!-- ALL-CONTRIBUTORS-BADGE:END -->

latest
npmnpm
Version
0.1.7
Version published
Maintainers
1
Created
Source

react-hot-pagination

All Contributors

npm package

Example

import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Paginate } from 'react-hot-pagination';

const App = () => {
  const [current, setCurrent] = React.useState(1);

  const handlePagination = (value: number) => setCurrent(value);

  return (
    <div>
      <Paginate
        current={current}
        handlePagination={handlePagination}
        range={2}
        total={30}
        components={{}}
      />
    </div>
  );
};

ReactDOM.render(<App />, document.getElementById('root'));

Getting started

npm i react-hot-pagination

Or

yarn add react-hot-pagination

Props

Paginate

These docs are inspired by react-flex-ready docs

range total current

OptionDefaultTypeDescription
range2{number}Pages shown before after the current page
total20{number}Total pages
current1{number}Current page
components{object}your Button, Separator, LeftArrow and RightArrow components
handlePagination{(value: number) => void}Your custom handle function to update the current page

Built with

  • TSDX

License

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

Contributors


Elbarae Rguig

💻 📖

DRISSI TOUBBALI Fadel

💻

Todo

  • Add more examples

Support

If you love this React component and want to support me, you can do so through my Patreon or GitHub sponsors.

Support me on Patreon

FAQs

Package last updated on 20 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts