Pagination

Page navigation with numbered links.

Installation

npx @noarka/cli add pagination

Usage

tsx
import {  Pagination,  PaginationContent,  PaginationEllipsis,  PaginationItem,  PaginationLink,  PaginationNext,  PaginationPrevious,} from "@noarka/ui";
tsx
<Pagination>  <PaginationContent>    <PaginationItem>      <PaginationPrevious href="#" />    </PaginationItem>    <PaginationItem>      <PaginationLink href="#" isActive>        1      </PaginationLink>    </PaginationItem>    <PaginationItem>      <PaginationLink href="#">2</PaginationLink>    </PaginationItem>    <PaginationItem>      <PaginationLink href="#">3</PaginationLink>    </PaginationItem>    <PaginationItem>      <PaginationNext href="#" />    </PaginationItem>  </PaginationContent></Pagination>

Examples

Many pages

Previous/next controls with an ellipsis over skipped ranges.

Small size

Compact page buttons.

Compact

Previous/next around a page counter.

API reference

Pagination

PropTypeDefault
children

Usually a single PaginationContent.

ReactNode-
className

Additional classes merged on the nav element.

string-

PaginationContent

PropTypeDefault
children

PaginationItem elements.

ReactNode-
className

Additional classes merged with the default row styles.

string-

PaginationItem

PropTypeDefault
children

One link, control, or ellipsis.

ReactNode-
className

Additional classes merged on the list item.

string-

PaginationPrevious

PropTypeDefault
href

Link target. Renders a native anchor.

string-
children

Label beside the arrow. Hidden below the sm breakpoint.

ReactNode"Previous"
className

Additional classes merged with the default styles.

string-

PaginationNext

PropTypeDefault
href

Link target. Renders a native anchor.

string-
children

Label beside the arrow. Hidden below the sm breakpoint.

ReactNode"Next"
className

Additional classes merged with the default styles.

string-

PaginationEllipsis

PropTypeDefault
className

Additional classes merged with the default ellipsis styles.

string-