Course contentsShow
← Web Development
Lesson 1513 of 2,98227. REST API Design for FrontendFree lesson

Load More Button Pattern

Implementing manual pagination with a button to fetch the next batch of results.

Load More Button Pattern

You'll learn how to implement manual pagination using a "Load More" button that fetches the next batch of results on demand, giving users explicit control over content loading.

What Is the Load More Pattern?

The Load More pattern is a user-initiated pagination approach where content loads in batches. Unlike infinite scroll (which loads automatically when scrolling), a visible button lets users decide when to fetch more data. Think of it like turning pages in a photo album—you control when you're ready to see the next set of pictures.

How It Works

You start by displaying an initial batch of results (say, 20 items). At the bottom, you show a "Load More" button. When clicked, it fetches the next batch using offset-based or cursor-based pagination, appends those results to the existing list, and updates your pagination state.

The button typically disappears when there's no more data to load (when the API returns fewer items than requested or includes pagination metadata indicating you've reached the end).

Implementation Flow

  1. Initial load: Display first batch plus the button
  2. User clicks: Make a fetch request with updated offset/cursor
  3. Append results: Add new items to the existing list (don't replace)
  4. Update state: Increment offset or store the next cursor
  5. Check completion: Hide button if no more data exists

This pattern works well for feeds, search results, or product listings where users want control over their browsing pace. It's also more accessible than infinite scroll since keyboard users can easily reach footer links.

Key Takeaway: The Load More button pattern combines the best of both worlds—progressive content loading without the unpredictability of automatic infinite scroll, giving users explicit control while maintaining a seamless browsing experience.