A component to divide content into multiple pages, making it easier for users to navigate. 💖
Web Browser
- Can be used as an emulator to build applications. Example [Chrome, Firefox, Safari & Opera].Internet
- Because many use CDN and to make it easier to find solutions to all problems.
const generatePagination = require('pagination-component');
const currentPage = 5;
const totalPages = 10;
const visiblePages = 5;
const pagination = generatePagination(currentPage, totalPages, visiblePages);
console.log(pagination); // Output: [3, 4, 5, 6, 7]
The generatePagination
function takes three parameters:
currentPage
: The current page number.totalPages
: The total number of pages.visiblePages
: The number of visible page links. It returns an array of page numbers to be displayed based on the current page, total pages, and visible pages.
- The function returns an array of page numbers to be displayed.
- v1.0.0 : 07 March 2024
- v1.0.1 : 11 March 2024
- v4.0.0 : 11 March 2024
- v4.0.1 : 13 March 2024
- v4.0.2 : 18 March 2024
- v5.0.0 : 31 March 2024
- Facebook : Oned Ionys
- Instagram : @onedionys
- Twitter : @onedionys
- LinkedIn : @onedionys
- Copyright © 2024 One Dionys
- One Dionys - Pagination Component is an open source project licensed under the MIT license
Love One Dionys - Pagination Component? Support this project by donating or sharing with others in need.
Made with ❤️ One Dionys