Data Table

Tables make it easier for users to compare and analyse data. Data tables organize information with logical relationships and two-dimensional data structures from a data set into a grid with two axis. An example of two-dimensional data is a table of flight costs, each row represents an airline, and each column represents a destination. 

Default Table

Anatomy

table anatomy
NameDescriptionRequired
HeaderHeadings define the data’s relationship. Use short and descriptive headings.Yes
CellA singular piece of dataYes
Header BackgroundUsed to emphasize header row. Background color conveys states default, selected, or hover.Yes
Cell BackgroundSolid color thats used to contrast header row.Yes
Table BorderContains table content.Yes
Sorted headerSelected state for sorted header column, uses the filled sorted icons and active bar.Optional
Sorted iconSelecting a column sorts the table by that column’s content, with an arrow indicating the order. Select again to reverse the order.Required when column is sorted
Active barSignifies the current sorted column.Required when column is sorted
BorderUse to segment data or emphasize horizontal, linear relationships within the data.Optional
Zebra StripeUse to emphasize horizontal rows or linear columns for comparison tables. Zebra stripes can be used in addition or instead of borders.Optional
Additional actionsApply actions for each row, for example copy row content or delete row. Additional actions uses menu.Optional
Selectable RowSelect one or more rows in a table. Selectable rows can be used in the batch actions pattern with selection controls and menu. Here’s an example of batch actions with options for select all, print, and export.Optional
Checkbox LabelVisual label for the selectable row check box. Each row must have a unique label this is made up of the data. This could be made up of one column or multiple columns.Required when using Selectable row
Expandable RowUse to display supplementary information within an expandable row.Optional

States

Default

default state

Hover

hover state

Focus

focus state

Selected

selected state

Unselected

unselected state
StateDescription
DefaultUsers can select the sort button to activate.
HoverWhen a cursor hovers over the sort button, the background color changes to indicate that the button is clickable.
FocusA focus outline appears around visual element to help users identify current selected component. This is used when a user navigates using keyboard controls or uses a cursor.
SelectedSelecting a column sorts the table by that column’s content, with an arrow indicating the order. Select again to reverse the order. You may only select one column at a time. The selected state is signified using the active bar and filled sort icons.
UnselectedUnfilled icon and no active bar indicates that the content is not sorted by this column.

Questions?

Connect with the DLS Team on Slack or by email.

Resources

Check out additional resources.