Skip to main content
Signature

Import

To ensure optimal bundle sizes, see Optimize build size.
Vue

See this widget in action

Preview this widget and its behavior.

About this widget

The ais-pagination widget displays a pagination system which lets users change the current page of search results.
Pagination is limited to 1,000 hits per page. For more information, see [Pagination limitations](/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/jvue

Examples

Vue

Props

boolean
default:true
Whether to display the first page link.
Vue
boolean
default:true
Whether to display the previous page link.
Vue
boolean
default:true
Whether to display the next page link.
Vue
boolean
default:true
Whether to display the last page link.
Vue
number
default:3
How many page links to display around the current page.
Vue
number
default:"Infinity"
The maximum number of pages to display (and to allow navigating to).
Vue
object
default:"{}"
The CSS classes you can override:
  • ais-Pagination. The root of the widget.
  • ais-Pagination--noRefinement. The root of the widget without refinement.
  • ais-Pagination-list. The list of the page items.
  • ais-Pagination-item. The page item of the list.
  • ais-Pagination-item--firstPage. The “first” item of the list.
  • ais-Pagination-item--lastPage. The “last” item of the list.
  • ais-Pagination-item--previousPage. The “previous” item of the list.
  • ais-Pagination-item--nextPage. The “next” item of the list.
  • ais-Pagination-item--page. The “page” item of the list.
  • ais-Pagination-item--selected. The selected item of the list.
  • ais-Pagination-item--disabled. The disabled item of the list.
  • ais-Pagination-link. The clickable element of an item.
Vue

Customize the UI

The slot to override the complete DOM output of the widget.When you implement this slot, none of the other slots will change the output, as the default slot surrounds them.Scope
  • currentRefinement: number. The number of the selected page.
  • nbHits: number. The total number of hits.
  • nbPages: number. The total number of pages.
  • pages: number[]. The pages to render in the widget.
  • isFirstPage: boolean. Whether the current page is the first page.
  • isLastPage: boolean. Whether the current page is the last page.
  • refine: (value: number) => void. A function to select the next page.
  • createURL: (value: number) => void. A function to generate an URL from a refinement.
Vue

HTML output

HTML
If SEO is important for your search page, ensure that your custom HTML is optimized for search engines:
  • Use <a> tags with href attributes to allow search engine bots to follow links.
  • Use semantic HTML and include structured data when relevant.
For more guidance, see the SEO checklist.
Last modified on July 22, 2026