Skip to main content

Data Table

UI Design

What is a Data Table

A data table is a grid of rows and columns that shows structured data, such as orders, users or transactions. It is the most efficient way to show many records and compare them on the same attributes.

What users do with Data Tables

  • Find records that match criteria, with search, sort and filters
  • Compare values across rows and columns
  • View or edit a single row's details
  • Act on one or many records, such as export or delete

How to design a Data Table

Keep column headers clear and short. Left-align text and right-align numbers with the same decimals. Use enough row height and subtle dividers for scanning, and offer bulk selection when users act on many rows.

Data Tables vs. Cards

Cards suit browsing varied content. Tables win for comparison, because values sit side by side. For interactive tables that users navigate with arrow keys, follow the W3C grid pattern for keyboard and screen reader support.

Frequently asked questions

What tasks should a data table support?

NN/g names four: finding records that match criteria, comparing data, viewing or editing a single row, and taking actions on one or many records. Sorting, filtering and bulk actions serve these tasks.

When should you use a table instead of cards?

When users need to compare items on the same attributes, such as price, date or status. Tables put values side by side, so the eye moves less than across a grid of cards.

How should numbers be aligned in a table?

Right-align numbers and use the same number of decimal places, so digits line up and values are easy to compare. Left-align text.