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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react_bootstrap_paginator

v1.0.2

Published

A contextual paginator on top of react and bootstrap

Downloads

15

Readme

reactBootstrapPaginator

A contextual paginator on top of react and bootstrap

Installation

  npm install react_bootstrap_paginator

What do you mean with contextual paginator?

I mean that it's presentation will change according to the context.

If you have the pages 1-10 , are on the first one and want to show 10 pages it will look like this: 1_to_10

Notice no arrow or dots indicating more

On 1-50 and you are on page 30 it would look like this:

1-50

Notice both arrows , dots indicating more pages

And if you are on the last page it will look like this:

end

Notice no right arrow and no right dots

Usage ES5 standalone

I have a codepen example here

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <title>Reacomponents - Paginator ES5</title>
       <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
    </head>
    <body>
      <div id="the_paginator"></div>
      <script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react-dom.js"></script>
      <script src="../../build/react-paginator.min.js"></script>
      <script>
        var Paginator = React.createFactory(ReactPaginator);

        window.onload = function () {
          var PaginatorComp = Paginator({
            current: 10,
            total: 1000,
            onPage:function(page){
              console.log("I should do something regarding page "+page);
            }
          });
          var container = document.getElementById('the_paginator');
          var l = ReactDOM.render(PaginatorComp, container);
        };
      </script>
    </body>
    </html>

Usage ES6

  import Paginator from '../../../src/Paginator.jsx';
  import React from 'react';
  import ReactDOM from 'react-dom';
  const App = React.createClass({
          pages:{
               current: 10,
              total: 1000
          },
          pageClick(page){
              console.log("I should do something regarding page "+page);
          },
          render(){
              return(
                 <Paginator current={this.pages.current} total={this.pages.total} max={this.max} onPage={this.pageClick}></Paginator>
              )
          }
  });
  ReactDOM.render(<App/>, document.getElementById('the_paginator'));