Table
A table component is a graphical user interface (GUI) element used to display data in an organized way. It consists of one or more rows and columns, with each cell containing a data value. Tables present information in an easy-to-read format.
Anatomy
Table components can be customized with various options such as sorting, filtering, pagination, and styling.
Toolbar:
A collection of functions, such as edit, copy, and delete, that can be used to modify the data in the table.Column Header:
The title of each column contains a description of the data it contains.Row:
Each row is a single record within the database. All columns on the row relate to the same record.Pagination:
The table footer contains information regarding the total number of records, the range of records being shown, and navigation tools to move through multiple pages where necessary.Search Field:
Use this field to search all rows and columns of the table to find a specific record or data value.Sort and Filter:
These standard tools can be applied to each column. Sort reorders the records, such as toggling between ascending and descending order. A Filter allows you to select only the records that meet specified parameters (e.g. a date range).
States
Each record in the table has a different state based upon the current situation.
Default:
When no other states are applied, the record appears in the default state.Hover:
This occurs when the mouse passes over the record.Selected:
One or more records can be selected for further processing. These are shown with the checkbox selected.Selected-Hover:
A record that has already been selected and also has the mouse hovering over it.Disabled:
When in this state, the record cannot be selected or modified.
Behavior
The layout of a table can be modified by the user to suit their current needs. For example, for tables that contain a lot of data, the height of each row can be adjusted. To make finding specific records easier, the columns can be sorted and filtered to bring specific records to the top of the table.
Row Height
Use the Row Height feature to increase or decrease the height of each row in the table. Reducing the height may make the data harder to read. The default value for row height is Large.
DO: The row height on the table column header should be the same as the content row height.
DON'T: Do not mismatch row heights as this creates an unbalanced display.
Sorting
Sorting allows users to arrange the data logically, such as alphanumerically or by date, in ascending or descending order, for a selected column.
Different sorting options are available depending on the type of data in the column. The arrow icon next to the column header shows the direction of the sort. Click on the column to reverse the order.
Clickable Column:
This is the column to be sorted. Not all columns will be sortable / filterable.Sortable Visual Icon:
The arrow displays the direction of the sort, whether ascending (up arrow) or descending (down arrow). If there is no arrow, the column has not been sorted.Expand Column Dropdown:
This icon provides access to the sort and filter functions for the column.
Selection
One or more rows of the table can be selected. Any action taken (i.e. delete) will be applied to all of the selected records. Clicking the checkbox selects that record.
Use the checkbox in the header to select all the items on the current page. Use the dropdown menu to select all items in the database.
If all the items on the page are selected, an inline message appears with the option to expand the selection to include all items in the table.
The user can deselect all items in the table without having to visit every page by using the “Clear all selections” option. This also appears in the header dropdown menu. Unchecking the box in the header will unselect all items on the current page only.
Actions
Actions are operations that can be performed on a record to modify the data.
When multiple actions are available for a selected row, pick the desired action from the icon in the header. These actions are also available under the More ( ... ) icon.
If there is only one available action, it is fully exposed on the table.
Text
When clicked, linked items open a new page or sheet with additional information on that record.
DO: Set the table's first column to use the link style when there is more information available.
DON'T: Do not use the link style for table cells that are not interactive.
DO: All text data in cells should be left-aligned.
DON'T: Do not right-align or center-align text data.
DO: All numerical data in cells should be right-aligned.
DON'T: Do not left-align or center-align numerical data.
Filter Table
Filters allow users to select the data shown in a table, based on selectable parameters, to quickly and easily find the record without having to search manually.
The parameters for a table filter can be entered in a sheet.
Filter Table Column
Table columns can be filtered. When a filter has been applied, the filter icon appears next to the header name. Only one column at a time can be filtered in this way.
Expand Column:
This is the header name of the column to be sorted. Not all columns will be sortable / filterable.Filter Applied Icon:
The icon shows that a filter is acting upon this column.Expand Column Dropdown:
This icon provides access to the sort and filter functions for the column.
DO: Include a filter icon next to the column header to indicate that a filter has been applied. Also, make the column header a single click item.
DON'T: Do not make the filter and chevron icons separate clickable actions.
Inset Table
An inset table is embedded within another element, such as another table’s cell, or a container div. This can be useful for displaying tabular data in a more compact or organized format, as well as for creating more complex layouts that combine multiple elements.
Specs
The only variable element in a table is the row height, and these come in 3 sizes. The height of the column header and each of the rows of data should all be the same.
Keyboard Interactions
Accessibility requires that each item on the screen is reachable using the keyboard alone. The mouse is not always an option for some users.
Keyboard navigation employs the following shortcuts.
Keystrokes | Interaction |
---|---|
Tab | Moves into the table. |
Shift + Tab | Moves to the previous interactive element. |
← Left Arrow and → Right Arrow | Moves between cells and sorting items. |
↑ Up Arrow and ↓ Down Arrow | Moves between cells and sorting items. |