Skip to content

Table usage guidelines

Data tables allow users to view and manage data in an organized way.

  • To present structured, comparable data in an easy-to-view grid format.
  • When users need to scan, sort, or analyze multiple data points efficiently.
  • For datasets where features such as sorting, filtering, or pagination are beneficial.
  • To display relationships between multiple columns and rows of information.
  • When presenting only a small amount of data that can be shown as a list or card layout.
  • When creating a browsing experience where the user may not know what they’re looking for or are discovering new data. For this, consider using cards instead.
  • If the data benefits from progressive disclosure or is difficult to show in a row and column format. For this consider using disclosures instead.
  • When displaying hierarchical data that fits better in a tree.
Title
Release year
Rating
The Shawshank Redemption19949.3
The Godfather19729.2
The Godfather: Part II19749.0
The Dark Knight20089.0
12 Angry Men19578.9
Schindler's List19938.9
The Lord of the Rings: The Return of the King20038.9
Pulp Fiction19948.9
The Lord of the Rings: The Fellowship of the Ring20018.8
Forrest Gump19948.8

Ensure tables are placed with enough space that the table and the UI aren’t crowded. If the table has a large number of rows or columns, it should be the focal point of the UI and should not be crammed into a space it does not fit. For tables with many columns or an unpredictable number of columns, horizontal scrolling can be used to manage space on the page.

Cells can contain either plain text, text links, or other components. Each cell should only contain one type of content - that is, all content within a cell should be either interactive or non-interactive, and never a mix of both.

Cells that use other components like badges and actions should use the small size for that component.

Cell content type should always be aligned consistently:

  • Left-align text content
  • Right-align numerical data
  • Center-align status indicators, badges, and action buttons
Do
Product
Total orders
Status
T-shirt52
Active
Banner115
Active

Rows can contain actions that affect only that single row. The actions column should always be the right-most column in the table, and the actions in the column should be consistent across each row. There are several ways of achieving actions in rows:

  • Single action: if there is only one action the user can take, use a single button.
  • 2-3 actions: if there are 2-3 actions, icon buttons can be used to display all the actions together. This should only be used for actions that have clear and common icons like “edit”, “delete”, and “view”.
  • 3+ actions and complex actions: a menu is used if there are more than three actions, or if the actions do not have an obvious and common icon and would be more clear when written out with a label.
Do
Product
Total orders
Status
Single button
T-shirt52
Active
Banner115
Active
Do
Product
Total orders
Status
Icon buttons
T-shirt52
Active
Banner115
Active
Do
Product
Total orders
Status
Menu
T-shirt52
Active
Banner115
Active

Column headers in the table component have sort functionality built in. Use this for sorting tables by columns, and avoid adding additional sort actions outside of the table.

Pagination is useful to keep tables easily readable for users when there are large data sets. Generally tables should show 10 rows per page and provide pagination so that users can easily understand the data in the table. If a table contains predictable and static data, more than 10 rows can be shown, but if the number of rows is unpredictable or the table will become excessively long, pagination should be used. For large data sets it can be helpful to allow users to select how many rows per page they would like to see. For this use a select that is left-aligned with the bottom of the table.

Do

Infinite scrolling should not be used for tables. Using pagination gives users better control when they are navigating the data and it gives them a more comprehensive view of the data set so they are not endlessly scrolling.

For simple table filtering and searching, actions should be placed above the table. These filters should be directly connected to the table columns and provide simple selections on the most important columns.

Tables with many filters or complex filters should use a more advanced filtering experience. This is often achieved in a sidebar or a drawer.

Batch actions or other table-level actions (like creating a new row) should be placed above the table. At most only one primary button should be used for table-level actions.

Headers

  • Use clear, concise labels for each column and limit the header length to no more than a few words (for example “Status” instead of “Current status of order”).
  • Headers can have an icon either before or after the text. Icons should only be used where they provide additional and new context or information rather than as a supplemental representation of the written header text.

Cells

  • Keep cell content as concise as possible.
  • Cells should only contain one type of content. That is, all content within a cell should be either interactive or non-interactive, and never a mix of both.

Empty tables should always display a title and a description explaining that there is no data to show, and what the user can do to fix the issue. There are a few reasons why a user may encounter an empty table but most commonly, they encounter this pattern because there is no data or because of user selections.

If the table is empty because there is truly no data to show, always explain why there isn’t any data. If the data is user-generated, provide a call-to-action to create or add new data.

Do
Product
Total orders
Status
No products yetYour products will show up here. Create your first product to get started.

Sometimes when searching, filtering, or making other selections, there might not be any data that matches the user’s parameters. When this happens, an empty state should be shown to indicate that their parameters are too restrictive.

Do
Product
Total orders
Status
No products matched your filtersTry adjusting or clearing your filters to find products.