Data table

Data table is one table for every list people work through. Selection is always the first column, every action lives in one toolbar above the rows, and the same parts hold up from a wide dashboard down to a phone.

MemberTeamRoleStatusProjectsLast activeActions
MOMaya Okafor
Design
Admin
Active
12
Today
PRPriya Raman
Engineering
Editor
Away
8
Yesterday
JAJordan Alvarez
Marketing
Editor
Active
5
Today
SWSam Whitfield
Support
Viewer
Invited
0
Never
EMElena Marsh
Operations
Owner
Active
21
Today
RDRosa Delgado
Engineering
Viewer
Deactivated
3
Aug 14
Data tableSelect a row. The toolbar swaps in place to the count and bulk actions. Shift-click selects a range, and Escape clears.

Anatomy

A native table inside a box that measures its own width. The toolbar sits above it, and the cards replace it on a narrow screen.

MemberTeamRoleStatusProjectsLast activeActions
MOMaya Okafor
Design
Admin
Active
12
Today
PRPriya Raman
Engineering
Editor
Away
8
Yesterday
JAJordan Alvarez
Marketing
Editor
Active
5
Today
SWSam Whitfield
Support
Viewer
Invited
0
Never
EMElena Marsh
Operations
Owner
Active
21
Today
RDRosa Delgado
Engineering
Viewer
Deactivated
3
Aug 14
Pinned columnsScroll it sideways. The name and the actions stay put, with a shadow where there's more under them.

Variants and states

MemberTeamRoleStatusProjectsLast activeActions
SWSam Whitfield
Support
Viewer
Invited
0
Never
EMElena Marsh
Operations
Owner
Active
21
Today
RDRosa Delgado
Engineering
Viewer
Deactivated
3
Aug 14
Locked rowThe workspace owner can't be selected. The lock says why on hover or focus, and select all leaves her out.
MemberTeamRoleStatusProjectsLast activeActions
MOMaya Okaformaya@example.com
Design
Admin
Active
12
Today
PRPriya Ramanpriya@example.com
Engineering
Editor
Away
8
Yesterday
JAJordan Alvarezjordan@example.com
Marketing
Editor
Active
5
Today
SWSam Whitfieldsam@example.com
Support
Viewer
Invited
0
Never
EMElena Marshelena@example.com
Operations
Owner
Active
21
Today
RDRosa Delgadorosa@example.com
Engineering
Viewer
Deactivated
3
Aug 14
Secondary textA second line under each name. Rows grow from 40 to 52 pixels, and nothing goes taller.

Bulk actions

Every table's bulk actions read in one order: your actions, then More, then Delete behind a divider. An action that works on one row stays in place, dimmed, while more are selected.

Delete only

2 members selected
MemberTeamRoleStatusProjectsLast activeActions
MOMaya Okafor
Design
Admin
Active
12
Today
PRPriya Raman
Engineering
Editor
Away
8
Yesterday

Export

2 members selected
MemberTeamRoleStatusProjectsLast activeActions
MOMaya Okafor
Design
Admin
Active
12
Today
PRPriya Raman
Engineering
Editor
Away
8
Yesterday

Several

2 members selected
MemberTeamRoleStatusProjectsLast activeActions
MOMaya Okafor
Design
Admin
Active
12
Today
PRPriya Raman
Engineering
Editor
Away
8
Yesterday

One item, with two selected

2 members selected
MemberTeamRoleStatusProjectsLast activeActions
MOMaya Okafor
Design
Admin
Active
12
Today
PRPriya Raman
Engineering
Editor
Away
8
Yesterday
Bulk action patterns

Across pages

Select the page, and the toolbar offers every matching row. Show selected only hands the filtering to the app.

MemberTeamRoleStatusProjectsLast activeActions
MOMaya Okafor
Design
Admin
Active
12
Today
PRPriya Raman
Engineering
Editor
Away
8
Yesterday
JAJordan Alvarez
Marketing
Editor
Active
5
Today
SWSam Whitfield
Support
Viewer
Invited
0
Never
EMElena Marsh
Operations
Owner
Active
21
Today
RDRosa Delgado
Engineering
Viewer
Deactivated
3
Aug 14
A directory of 248 members

On a phone

Under 32rem of its own width, the table scrolls under an icon-only toolbar, or each row becomes a card. Sort and filters move into a sheet.

MemberTeamRoleStatusProjectsLast activeActions
MOMaya Okafor
Design
Admin
Active
12
Today
PRPriya Raman
Engineering
Editor
Away
8
Yesterday
JAJordan Alvarez
Marketing
Editor
Active
5
Today
SWSam Whitfield
Support
Viewer
Invited
0
Never
EMElena Marsh
Operations
Owner
Active
21
Today
RDRosa Delgado
Engineering
Viewer
Deactivated
3
Aug 14
Scroll
1 member selected
MemberTeamRoleStatusProjectsLast activeActions
MOMaya Okafor
Design
Admin
Active
12
Today
PRPriya Raman
Engineering
Editor
Away
8
Yesterday
JAJordan Alvarez
Marketing
Editor
Active
5
Today
SWSam Whitfield
Support
Viewer
Invited
0
Never
EMElena Marsh
Operations
Owner
Active
21
Today
RDRosa Delgado
Engineering
Viewer
Deactivated
3
Aug 14
Cards

In a form

As a picker, the selection is the form's value and the footer counts it.

TitleAccess
Onboarding checklist
Workspace
Brand guidelines
Public
Release notes
Public
2 of 3 documents selected
Picker

Usage

  • 01Selection is always the first column, and row actions are always the last, pinned to the end.
  • 02Put every action in the toolbar. Don't add hover actions or a floating bar; they split actions across places.
  • 03Pin the row's name to the start and at most one must-see column to the end.
  • 04Lock a row that can't be selected, and say why in lockedReason.
  • 05Give actions an icon, so they still fit on a phone.
  • 06Use narrowLayout="cards" when a row reads better as a summary, such as people with a status. Keep scroll for data people compare across columns.

Best practices

Elena MarshLocked
DoShow why a row can't be selected.
Elena Marsh
Don'tDon't disable a row without a reason. People can't tell it's on purpose.

Accessibility

  • 01It's a native table, not a grid: checkboxes and buttons are ordinary Tab stops.
  • 02Each row checkbox is named from its first name cell, “Select Maya Okafor”, and select all says its scope, “Select all members on this page”.
  • 03A locked row's checkbox is disabled and described by the reason, and the lock is focusable so keyboard users can open its tooltip.
  • 04Selection changes are announced through a status region, and Escape clears the selection.
  • 05When the focused control goes away, such as Clear or a row that swaps to a card, focus moves somewhere sensible instead of the page.
  • 06Only one of the table and the cards is ever in the page, so screen readers don't meet each row twice.

References