🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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.5
latest
Source
npm
Version published
Maintainers
1
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

PaginationControl

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
changePagenumber => anypage => console.log(page)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 29 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