Skip to main content
Elastic UI
Elastic UI
ComponentsPatternsContentData visualization
EUI ChangelogGitHubFigma
  • Guidelines
    • Getting started
    • Accessibility
    • Writing
    • Testing
  • Theming
    • Theme provider
    • Color mode
    • High contrast mode
    • Borders
    • Breakpoints
    • Colors
    • Sizing
    • Typography
  • Templates
    • Page template
    • Sitewide search
  • Layout
    • Accordion
    • Bottom bar
    • Flex
    • Flyout
    • Header
    • Horizontal rule
    • Modal
    • Page components
    • Page header
    • Panel
    • Popover
    • Resizable container
    • Spacer
  • Navigation
    • Breadcrumbs
    • Buttons
    • Collapsible nav
    • Context menu
    • Facet
    • Key pad menu
    • Link
    • Pagination
      • Guidelines
    • Side nav
    • Steps
    • Tabs
    • Tree view
  • Display
    • Aspect ratio
    • Avatar
    • Badge
    • Callout
    • Card
    • Comment list
    • Description list
    • Drag and drop
    • Empty prompt
    • Health
    • Icons
    • Image
    • List group
    • Loading
    • Progress
    • Skeleton
    • Stat
    • Text
    • Timeline
    • Title
    • Toast
    • Tooltip
    • Tour
  • Forms
    • Form controls
    • Form layouts
    • Form validation
    • Text controls
    • Numeric controls
    • Selection controls
    • Search and filter controls
    • Date and time controls
    • Other controls
  • Tabular content
    • Tables
    • Data grid
  • Editors & Syntax
    • Code
    • Markdown
  • Utilities
    • Accessibility
    • Auto sizer
    • Beacon
    • Color palettes
    • Copy
    • CSS utility classes
    • Delay
    • Error boundary
    • Focus trap
    • Highlight and mark
    • HTML ID generator
    • I18n
    • Inner text
    • Mutation observer
    • Outside click detector
    • Overlay mask
    • Portal
    • Pretty duration
    • Provider
    • Resize observer
    • Scroll
    • Text diff
    • Text truncation
    • Window events
  • EUI
  • Navigation
  • Pagination
  • Guidelines

Pagination guidelines


Don’t rely on pagination for users to find what they’re looking for

For any results-style table, always provide ways to filter, search, etc for the thing that the user wants. Pagination is only helpful once the user has reduced the 1000+ results to just 100 (for example).

Using search, filters and pagination together

Full prototype

Don’t rely on pagination to indicate total results

When possible, always present a clear indicator of how many (and if not all results) have been returned. Just a simple count will do. Including a detailed summary of results at the top of the table or list goes a long way to signify what paging can’t.

Indicate indeterminate results

If you cannot provide a concrete number of results, you still have to communicate what the current results showcase. For instance, say "Showing first 100 results" or "Search results maxed at 1000" or "Results fetched at runtime".

Remember that not all users understand how your data API works. They just care about the data that's being shown to them.


Give users control of pagination

Providing a “Rows per page” option is often helpful enough to provide users control over the amount of data they see at once.

Keep the choices simple and only show “Rows per page” if there are more rows than the smallest option. For example, if there are only 9 rows and the smallest option is 10 rows per page, hide the selector.

10 rows
20 rows
50 rows

Do: For shorter sets of data, you may want to include an “Show all” option.

10 rows
15 rows
20 rows
30 rows
50 rows

Don't: Overload the user with choices, stick to only 2-3 options.

Optimize your defaults

Most users don’t customize the default view. Therefore, it’s vital that you provide optimal defaults and reduce complexity as the number of entries increase. This means choosing a default “Rows per page” that best corresponds to the total results. For instance, 1000+ results shouldn’t start with 10 rows per page, but rather 20 or 50.

Here are some samples of what controls to provide based on the number of data entries.

𐘂𐘂
✄𐘗✄𐘗
Total entries
↦
Rows per page options
↦
Pagination style
↵
Total entries
0
↦
Rows per page options
Use EuiEmptyPrompt in place of table
↦
Pagination style
N/A
↵
Total entries
Less than 50
↦
Rows per page options
Show 10, but allow All
↦
Pagination style
Numbered
↵
Total entries
51 - 100
↦
Rows per page options
10, 20, All
↦
Pagination style
Numbered
↵
Total entries
101 - 200
↦
Rows per page options
10, 20, 50
↦
Pagination style
Numbered or Compressed
↵
Total entries
More than 200
↦
Rows per page options
20, 50, 100
↦
Pagination style
Numbered or Indeterminate
↵
Total entries
Unknown
↦
Rows per page options
Depends on what you expect the total entries to be
↦
Pagination style
Indeterminate
↵
𐘂𐘂

If the total results are unknown, you can make a best guess based on the context of that specific table, whether there’s most likely going to be tens or thousands of results. From there you can decide to show 10 rows per page or 20 by default.

The complexity of the data will also contribute to this equation, which is why the table above is just a sample.


Preserve the user-customized state of pagination

When providing pagination, customizable display options, and data filters, always save the user’s state in some form. This is especially important if your data includes links that navigate a user away from the current view. There’s nothing more frustrating for users than going back to find their filters and pagination have been reset.

Below is a working example that utilizes

localStorage to save the table’s state.

Loading...

Don’t use infinite scrolling

Infinite scrolling, i.e. loading data as the user scrolls, is the exact opposite of being able to save the user’s pagination state. As soon as they navigate away from the page, their position in the list is lost. It’s better to increase the quantities of rows per page or provide a “Load more” action.

Provide a Show all

Do: Provide a direct action for users to initiate the loading of more data.

Too many rows per page choices

Don't: Use infinite scroll to automatically load more rows of data.

Edit this page

Previous
Pagination
Next
Side nav
  • Don’t rely on pagination for users to find what they’re looking for
  • Don’t rely on pagination to indicate total results
    • Indicate indeterminate results
  • Give users control of pagination
    • Optimize your defaults
  • Preserve the user-customized state of pagination
    • Don’t use infinite scrolling
EUI is dual-licensed under Elastic License 2.0 and Server Side Public License, v 1 | Crafted with ❤ by Elastic