Skip to main content

What are you looking for?

Try searching for…

Components

Table

Table is used to display structured information in a neat and organized manner. Tables can make it easier for users to scan and compare information.

Use table when

  • the goal is to help users compare information easily
  • the data needs a clear structure with rows and columns
  • the content can benefit from sorting

Avoid using table when

  • the purpose is to create layout or visually organise content on a page
  • the information is better suited to a list or card view
  • the content is very limited, for example only one column or very few data points without a need for comparison
  • the table becomes difficult to read on mobile because the data set is large

Example

Zebra stripes

Zebra striping makes tables easier to read by visually separating rows. It helps users stay on the correct line.

With border

A border around the table can help users distinguish it from other content on the page.

Numbers in a table

When numbers appear in a table and are meant to be compared, align them to the right within the cell.

Sorting

You can show that the table supports sorting based on the content of a column.

Guidelines

Use table to structure and present data clearly in rows and columns.

  • Content in tables should be left-aligned, except for numbers, which should be right-aligned to make comparison easier.
  • Use <Table.HeaderCell> for header cells, not <Table.Cell>. A cell counts as a header when it describes the content of the same row or column.
  • In table rows with several actions, you can use a menu to save space if the actions do not need to be visible at all times.

Text

Avoid long texts in table cells. Keep content short and concise so it is easy to scan across rows and columns. If you need to show more information, consider linking to a detail page. Use headers to tell users what type of content they will find in the rows and columns.

As a general rule, content in cells should be left-aligned to make it easier to read and scan. The exception is numbers and currency and sometimes form elements and buttons.

Edit this page on github.com (opens in a new tab)