Skip to main content

Pagination

Storybook​

Go to Story

ButtonPaginationProps​

Defined in: src/components/Pagination/ButtonPagination/ButtonPagination.tsx:24

Extends​

  • UsePaginationProps

Properties​

PropertyTypeDescriptionOverridesInherited fromDefined in
initialPage?numberThe selected page on initial render. Default 1-UsePaginationProps.initialPagenode_modules/@nextui-org/use-pagination/dist/index.d.ts:15
siblings?numberThe number of pages to show on each side of the current page. Default 1-UsePaginationProps.siblingsnode_modules/@nextui-org/use-pagination/dist/index.d.ts:24
boundaries?numberThe number of pages to show at the beginning and end of the pagination. Default 1-UsePaginationProps.boundariesnode_modules/@nextui-org/use-pagination/dist/index.d.ts:29
showControls?booleanIf true, the range will include "prev" and "next" buttons. Default false-UsePaginationProps.showControlsnode_modules/@nextui-org/use-pagination/dist/index.d.ts:34
onChange?(page) => voidCallback fired when the page changes.-UsePaginationProps.onChangenode_modules/@nextui-org/use-pagination/dist/index.d.ts:38
totalnumberThe total number of pages.UsePaginationProps.total-src/components/Pagination/ButtonPagination/ButtonPagination.tsx:25
pagenumberCurrently selected page, 1-based.UsePaginationProps.page-src/components/Pagination/ButtonPagination/ButtonPagination.tsx:29
onPageChange(page) => void---src/components/Pagination/ButtonPagination/ButtonPagination.tsx:30

LinkPaginationProps​

Defined in: src/components/Pagination/LinkPagination/LinkPagination.tsx:27

Extends​

  • UsePaginationProps

Properties​

PropertyTypeDescriptionOverridesInherited fromDefined in
initialPage?numberThe selected page on initial render. Default 1-UsePaginationProps.initialPagenode_modules/@nextui-org/use-pagination/dist/index.d.ts:15
siblings?numberThe number of pages to show on each side of the current page. Default 1-UsePaginationProps.siblingsnode_modules/@nextui-org/use-pagination/dist/index.d.ts:24
boundaries?numberThe number of pages to show at the beginning and end of the pagination. Default 1-UsePaginationProps.boundariesnode_modules/@nextui-org/use-pagination/dist/index.d.ts:29
showControls?booleanIf true, the range will include "prev" and "next" buttons. Default false-UsePaginationProps.showControlsnode_modules/@nextui-org/use-pagination/dist/index.d.ts:34
onChange?(page) => voidCallback fired when the page changes.-UsePaginationProps.onChangenode_modules/@nextui-org/use-pagination/dist/index.d.ts:38
totalnumberMaximum number of available pages.UsePaginationProps.total-src/components/Pagination/LinkPagination/LinkPagination.tsx:31
pagenumberCurrently selected page, 1-based.UsePaginationProps.page-src/components/Pagination/LinkPagination/LinkPagination.tsx:35
getHref(page) => stringTranslates page number to URL. Example (page) => "/users?page=" + page--src/components/Pagination/LinkPagination/LinkPagination.tsx:44

ButtonPagination()​

function ButtonPagination(__namedParameters): Element;

Defined in: src/components/Pagination/ButtonPagination/ButtonPagination.tsx:36

Complete state-controlled pagination.

Parameters​

ParameterType
__namedParametersButtonPaginationProps

Returns​

Element


LinkPagination()​

function LinkPagination(__namedParameters): Element;

Defined in: src/components/Pagination/LinkPagination/LinkPagination.tsx:50

Complete link-based pagination.

Parameters​

ParameterType
__namedParametersLinkPaginationProps

Returns​

Element


Pagination()​

function Pagination(__namedParameters): Element;

Defined in: src/components/Pagination/Pagination.tsx:18

Primitives to build your Pagination. If you're looking for batteries-included components, see ButtonPagination and LinkPagination.

Parameters​

ParameterType
__namedParametersDetailedHTMLProps<HTMLAttributes<HTMLElement>>

Returns​

Element


PaginationContent()​

function PaginationContent(__namedParameters): Element;

Defined in: src/components/Pagination/Pagination.tsx:35

Container for pagination items.

Provides proper layout and spacing for pagination controls. Renders as a semantic unordered list for accessibility. Usually contains PaginationItemContainer components.

Parameters​

ParameterType
__namedParametersDetailedHTMLProps<HTMLAttributes<HTMLUListElement>>

Returns​

Element


PaginationItemContainer()​

function PaginationItemContainer(__namedParameters): Element;

Defined in: src/components/Pagination/Pagination.tsx:59

Container for individual pagination items.

Renders as a semantic list item for accessibility. Should wrap each individual pagination control.

Parameters​

ParameterType
__namedParametersDetailedHTMLProps<LiHTMLAttributes<HTMLLIElement>>

Returns​

Element

Example​

<PaginationItemContainer>
<PaginationItem>1</PaginationItem>
</PaginationItemContainer>

PaginationItem()​

function PaginationItem(__namedParameters): Element;

Defined in: src/components/Pagination/Pagination.tsx:94

Displays a single pagination control such as a page number or navigation action. Handles active state and proper accessibility attributes. Extends the Button component with pagination-specific behavior.

Parameters​

ParameterType
__namedParametersPaginationLinkProps

Returns​

Element

Examples​

<PaginationItem isActive>1</PaginationItem>
<PaginationItem aria-label="Go to previous page">
<PreviousIcon />
</PaginationItem>

PaginationPreviousIcon()​

function PaginationPreviousIcon(): Element;

Defined in: src/components/Pagination/Pagination.tsx:111

Icon component for the previous page navigation button. Displays a left-pointing chevron icon.

Returns​

Element


PaginationPrevious()​

function PaginationPrevious(__namedParameters): Element;

Defined in: src/components/Pagination/Pagination.tsx:129

Navigation component for moving to the previous page.

Displays a button with a left chevron icon by default.

Parameters​

ParameterType
__namedParametersPaginationLinkProps

Returns​

Element

Examples​

<PaginationPrevious onClick={() => goToPreviousPage()} />
// custom content
<PaginationPrevious>Previous</PaginationPrevious>

PaginationNextIcon()​

function PaginationNextIcon(): Element;

Defined in: src/components/Pagination/Pagination.tsx:141

Icon component for the next page navigation button. Displays a right-pointing chevron icon.

Returns​

Element


PaginationNext()​

function PaginationNext(__namedParameters): Element;

Defined in: src/components/Pagination/Pagination.tsx:159

Navigation component for moving to the next page.

Displays a button with a right chevron icon by default.

Parameters​

ParameterType
__namedParametersPaginationLinkProps

Returns​

Element

Examples​

<PaginationNext onClick={() => goToNextPage()} />
// custom content
<PaginationNext>Next</PaginationNext>

PaginationEllipsis()​

function PaginationEllipsis(__namedParameters): Element;

Defined in: src/components/Pagination/Pagination.tsx:182

Ellipsis component for pagination.

Indicates that pages have been omitted in the pagination sequence. Hidden from screen readers while providing an appropriate screen reader text. Commonly used when there are too many pages to display all page numbers.

Parameters​

ParameterType
__namedParametersDetailedHTMLProps<HTMLAttributes<HTMLSpanElement>>

Returns​

Element

Example​

<PaginationItemContainer>
<PaginationEllipsis />
</PaginationItemContainer>