You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

react-bootstrap-pagination-control

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-bootstrap-pagination-control

This component automatically controls the pagination display.

1.0.3
Source
npm
Version published
Weekly downloads
1.3K
8.5%
Maintainers
1
Weekly downloads
 
Created
Source

React Bootstrap Pagination Control

This component automatically controls the pagination display.

Install

npm install react-bootstrap-pagination-control

Options

Options

Usage

Component usage example.

PaginationControl

import 'bootstrap/dist/css/bootstrap.min.css';

import React, { useState } from 'react';
import { PaginationControl } from 'react-bootstrap-pagination-control';

export default () => {
  const [page, setPage] = useState(1)

  return <PaginationControl
    page={page}
    between={4}
    total={250}
    limit={20}
    changePage={(page) => {
      setPage(page)
    }}
    ellipsis={1}
  />
}

You can see a interative component in Storybook.

Props

NameTypeDefaultDescription
pagenumber1Active page
betweennumber3Max itens in left and right when page is in center, it's minimum value is 1
totalnumber-Required. Total of itens
limitnumber-Required. Max itens per page
changePageFunction() => {}Function that will receive the page nunber when click
nextbooleantrueControl if prev and next actions will be displayed
lastbooleanfalseControl if fist and last actions will be displayed
ellipsisnumber0Number itens after ellipsis, its maximum value is equal (between - 2)

License

MIT

Keywords

react

FAQs

Package last updated on 16 Oct 2022

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