Table

Tables display and organise data efficiently in cells, columns and rows.


Examples

A design example of a table.

Usage

When to use

  • To display and organise large or complex data sets.
  • To enable users to scan data.
  • To allow users to customise how data is displayed.

When not to use

  • Avoid using a table for simple data that can be presented in a card or list.
  • Avoid using tables as a replacement for a spreadsheet application.

Best practice


Emphasise important information

Consider highlighting important data in columns, rows or cells.

A design example showing a table with one row highlighted in red.

Responsive sizing

Ensure that tables scale correctly and remain legible on all screen sizes.

A design example of a table in two different screen sizes.

Useful functionality

Include sort and search functionality in complex tables so that users can find or customise the information they need.

A design example showing the search functionality in a table.

Specific headers

Write clear and concise table headers to accurately describe the data in each column.

A design example of a table with headers describing the content in the columns.

Helpful messaging

Use tooltips to explain unfamiliar or complex terms and actions.

A design example of a tooltip in a table.

Frozen panes

Use frozen panes for row and column headers to allow users to scroll through data.

A design example of scrollable rows and columns in red and frozen panes in blue.

Batch actions

Allow users to perform batch actions by selecting multiple rows using checkboxes.

A design example of a table showing certain rows that are selected via checkboxes.

Validation and alerts

Use validation and alerts to communicate issues with data and how users can resolve them.

A design example showing alerts in a table.

Highlighted rows

Highlight table rows on hover to help guide the user’s eye across the row.

A design example highlighting a table row on hover.

Zebra rows

Use zebra rows only in static tables without any interactive elements.

A design example of using zebra rows in a simple table.

Accessibility

Shell DS components are programmatically determinable with appropriate semantic markup and are designed to meet colour contrast requirements. If you’re not using Shell DS code, you will need to cover the accessibility considerations for each component in this pattern.

Keyboard navigation

Make the table navigable by keyboard using controls and appropriately manage focus.

Alternative text

Provide descriptive alternative text for table images.

Code consideration

Ensure tables are properly marked up using semantic HTML tags, such as ❬table❭, ❬thead❭, ❬tbody❭, and ❬th❭, to provide a structured and accessible representation.

Colour contrast

Ensure the colour contrast is 4:5:1 between text and background within the table, in accordance with WCAG guidelines.

Every effort has been made to ensure that the Shell Design System follows accessibility best practice.

The Shell DS React framework incorporates keyboard operation to support the widest variety of assistive technologies and devices. For any future frameworks other than React, accessibility will need to be reviewed.

Help us to help you by contacting the Accessibility team for support and information regarding any questions relating to accessibility.

Email the accessibility team


Is this page useful for you?

Your feedback helps to improve our documentation.