Skip to main content

InteractiveTable
ready
Storybook

The table is used to display and select data efficiently. The table component allows for the display and modification of detailed information. With additional functionality it allows for batch editing, as needed by your feature’s users.

Usage

Loading...
Live Editor
const data = [
  { size: 'Small', width: '24px', fontSize: '12px' },
  { size: 'Medium', width: '32px', fontSize: '14px' },
  { size: 'Large', width: '48px', fontSize: '18px' },
];
const columns = [
  { id: 'size', header: 'Size' },
  { id: 'width', header: 'Width' },
  { id: 'fontSize', header: 'Font Size' },
];
render(<InteractiveTable columns={columns} data={data} />);

Do’s

  • Use the table for admin user persona-centric workflows.
  • Use the table for batch selection and manipulation/editing of multiple rows of data.
  • Pagination works best when users are searching for specific pieces of content. Infinite scroll is more suitable for content exploration.
  • Use infinite scroll when the primary workflow involves exploration.
  • Conduct a use case analysis to determine what information should be in the primary table and what can be moved to the expanded section to declutter the overall UI.

Don’ts

  • Do not use the InteractiveTable in dashboards or panels.
  • Avoid using the table where mobile or responsiveness is a requirement. Consider an alternative pattern where the user is presented with a summary list and can click/tap to access an individual page for each row in that list.
  • Don't duplicate batch editing controls in the expanded row section.

Considerations

The InteractiveTable component supports workflows where the user needs to manipulate potentially large datasets. In its simplest form it allows for batch selection of existing data for further processing within a larger workflow. Its capabilities can be expanded to enable dataset creation as well as batch editing.

The table will typically be complemented by a section above to support either read-only & editing workflows. Read-only tables will usually have a summary of specific properties or calculated attributes of the dataset. Depending on the feature under design there may be import/export options. For editing workflows users will add new rows to the table below. There will also be batch edit options for existing rows in the header section.

Individual rows can be expanded to display additional details or reconfigure properties previously defined when the row was created. In the case of editing a row, the UI presented should be a duplicate of the header section above the table used to create the row. In the case where a property can no longer be edited it should still be displayed but disabled/greyed out. The expanded row area should be used to declutter the primary presentation of data. Carefully consider what the user needs to know at first glance and what can be hidden behind the Row Expander button. In general, data-types that are consistent across all dataset are in the primary table, variances are pushed to the expanded section for each individual row.

It is important to understand and define these as requirements for the feature under design as the InteractiveTable is not responsive and will not provide good UX on small or touch screens.

Content

ElementDetails
Tri-state batch selectorThe tri-state checkbox can be checked, not checked, or partially checked. The condition of being partially checked is based on the selection of child elements. If all child elements are selected, the parent checkbox is checked. If some child elements are selected, the parent checkbox is partially checked.
Row selectorSelect, deselect row
Row expand/collapseThe expander control is used to show and hide additional details and potentially controls/modifiers. and therefore declutter your app
Row detailsThis section is utilised to either show additional details or to provide the user with row specific controls or modifiers. Typically batch editing controls found outside the table should not be duplicated here.
Column LabelDescriptive identifier or header assigned to a column
Column SortSort alphabetically, numerically etc.
Row level Read-Only actionsDuplicate
Row level Editing actionDuplicate, Delete

Typical Workflows

Mixed Read-only & Editing

Where a table has a mix of read-only and editable elements, when the user selects read-only elements the editing batch operations above the table become disabled. Consider adding a column to indicate which rows are editable and which are read-only.

Playground