We use cookies to ensure you get the best experience on our website. Read our privacy policy

Skip to main content

Directory

Pagination Component

The Pagination component provides an intuitive interface for navigating through multi-page content. It features two variants, accessible controls, and customizable styling options. It is built to use the Astro collections pagination data but can be passed custom pagination data.

  • Check Circle

    Two Variants: Standard and minimal pagination styles

  • Check Circle

    Dynamic Page Numbers: Intelligent page number display

  • Check Circle

    Accessible Controls: Built with ARIA support

  • Check Circle

    Responsive Design: Adapts to different screen sizes

Create a standard pagination control:

<Pagination data={paginationData} maxPagesDisplayed={5} />

The standard pagination includes numbered pages and navigation buttons:

<Pagination
data={{
currentPage: 3,
lastPage: 10,
url: { prev: '#', current: '#', next: '#' }
}}
maxPagesDisplayed={5}
/>

A simplified version with only previous/next navigation:

<PaginationMinimal prevUrl="#" currentUrl="#" nextUrl="#" />
Pagination Component Props Extends <div> HTMLElement
Prop Type Default Description
data Page Pagination data object containing current page, last page, and URLs
maxPagesDisplayed number 5 Maximum number of page buttons to display
Minimal Pagination Component Props Extends <div> HTMLElement
Prop Type Default Description
prevUrl string URL for the previous page
nextUrl string URL for the next page
Blog posts
Search results
Product listings
Image galleries
Data tables

Limited Time Launch Sale

Add professional pagination to your website with our AstroJS starter template. Get started now!

GET 60% OFF!
North Star Themes Logo

Subscribe to our newsletter

Get the latest AstroJS tips and tricks right to your inbox

Email: [email protected]

© 2025 North Star Themes

Web Kit Provided By North Star Themes