🎉 Try the public beta of the new docs site at algolia.com/doc-beta! 🎉
Guides / Building Search UI / UI & UX patterns

Infinite scroll with InstantSearch iOS

A typical method for browsing results on mobile devices is an “infinite scroll”, which loads results as the user scrolls through the list. With InstantSearch this is as easy as setting the attribute infiniteScroll of a Hits widget to true.

If there are no hits, you should display a message to users and clear filters so they can start over.

Show more than 1,000 results

To ensure excellent performance, the default limit for the number of hits you can retrieve for a query is 1,000. When building an infinite scroll, you should stay within this limit.

1
2
3
$index->setSettings([
  'paginationLimitedTo' => 1000
]);

Increasing the limit doesn’t mean you can go until the end of the hits, but just that Algolia will go as far as possible in the index to retrieve results in a reasonable time.

Did you find this page helpful?