usePagination

Generates a page number range with ellipsis for pagination controls.

Generates an array of page numbers with ellipsis placeholders for use with Pagination component. Supports configurable sibling count around the current page.

Import#

import { usePagination } from '@volue/wave-react';

Example#


API Reference#

Arguments#

Prop
Type
Default
pageCount*
number
currentPage*
number
siblingCount
number
1

Returns#

number[] — An array of page numbers where -1 represents an ellipsis.