Skip to content

Releases: shakibdshy/react-pagination-pro

v1.1.0

31 Jan 16:36
Compare
Choose a tag to compare
  1. Reduced the bundle size by removing the Button Component dependency and use ul, li tag instead.
  2. Added new props to the API Reference table:
    • isDisabled - To disable all pagination actions
    • isDisabledPrevious - To disable only the previous page button
    • isDisabledNext - To disable only the next page button
  3. Added a new "Accessibility" section highlighting the accessibility features you've implemented:
    • Full keyboard navigation support
    • ARIA labels and roles
    • Proper tab indexing
    • Disabled states communication
    • Semantic HTML structure

v1.0.0

29 Jan 15:33
Compare
Choose a tag to compare

Features

  • 🚀 Modern React Hooks API
  • 🎨 Highly customizable UI
  • 🔄 Client & Server-side pagination
  • 📱 Fully responsive
  • 🎯 TypeScript support
  • 🎨 Built with Tailwind CSS
  • 🔌 Powered by @shakibdshy/react-button-pro
  • 🎭 Flexible styling with class-variance-authority
  • 🔧 Controlled & Uncontrolled components

Installation

npm install react-pagination-pro
# or
yarn add react-pagination-pro
# or
pnpm add react-pagination-pro

Quick Start

Basic Usage

import { Pagination } from 'react-pagination-pro';

function MyComponent() {
  return (
    <Pagination
      totalItems={100}
      defaultPageSize={10}
      onChange={({ currentPage, pageSize }) => {
        // Handle page change
      }}
    />
  );
}

Using the Hook (Custom UI)

import { usePagination } from 'react-pagination-pro';

function CustomPagination() {
  const [
    { currentPage, totalPages, pageSize, startIndex, endIndex },
    actions
  ] = usePagination({
    totalItems: 100,
    defaultPageSize: 10
  });

  return (
    <div>
      <div>
        Showing {startIndex + 1} to {endIndex} of {totalItems} items
      </div>
      
      <div>
        <button onClick={actions.previousPage}>Previous</button>
        <span>Page {currentPage} of {totalPages}</span>
        <button onClick={actions.nextPage}>Next</button>
      </div>
    </div>
  );
}

Full Changelog: https://github.com/shakibdshy/react-pagination-pro/commits/v1.0.0