Pagination: Offset vs Cursor vs Infinite

Pick list retrieval strategy based on consistency, UX, and backend behavior.

Pattern level: meso

TL;DR

Use cursor pagination when ordering is mutable and correctness across writes matters.

Decision criteria

  • Offset is simple and cache-friendly for static lists.
  • Cursor is resilient to inserts and deletes.
  • Infinite scroll is a presentation choice on top of either API.

Testing + Accessibility Rubric

CategoryLevelRequirementDone When
functionalunitState transitions handle loading, success, empty, and error.Reducer/state machine tests cover all transitions.
functionalintegrationClient correctly maps API contracts into UI-ready view models.Contract fixtures pass with no runtime shape mismatch.
a11yintegrationFull keyboard flow works for primary interaction loop.Tab/Shift+Tab/Enter/Escape scenarios pass for critical controls.
a11ye2eDynamic updates expose meaningful live region announcements.Manual SR checks validate announcement timing and text quality.

Used In Case Studies

Related Patterns