Skip to main contentCarbon Design System

Data table

The following page documents visual specifications such as color, typography, structure, and AI presence.

Color

Table header

ElementPropertyColor token
Table headerbackground-color$layer *
Titletext-color$text-primary
Descriptiontext-color$text-secondary

* Denotes a contextual color token that will change values based on the layer it is placed on.

Data table header

Column header

StatePropertyColor token
Enabledbackground-color$layer-accent *
text-color$text-primary
svg$icon-primary
Hoverbackground-color$layer-accent-hover *
text-color$text-primary
Focusborder$focus
Activebackground-color$layer-accent-active *

* Denotes a contextual color token that will change values based on the layer it is placed on.

Column headers

Row

StatePropertyColor token
Enabledbackground-color$layer *
text-color$text-secondary
border-bottom$border-subtle *
svg$icon-secondary
Hoverbackground-color$layer-hover *
text-color$text-primary
Focusborder$focus
Selectedbackground-color$layer-selected *
text-color$text-primary
border-bottom$border-subtle-selected*
svg$icon-primary
Selected + hoverbackground-color$layer-selected-hover *
Expandedbackground-color$layer *
svg$icon-primary
Zebrabackground-color$layer-accent *

* Denotes a contextual color token that will change values based on the layer it is placed on.

Data table rows

Toolbar

ElementPropertyColor token
Toolbarbackground-color$layer *
Icon buttonSee ghost button
ButtonSee primary button

* Denotes a contextual color token that will change values based on the layer it is placed on.

Data table toolbar

Batch action bar

ElementPropertyColor token
Barbackground-color$background-brand
Summarytext-color$text-on-color
ButtonSee primary button
data table batch actions

Typography

ElementFont-size (px/rem)Font-weightType token
Table header20 / 1.25Regular / 400$heading-03
Column header14 / 0.875SemiBold / 600$heading-compact-01
Row text14 / 0.875Regular / 400$body-compact-01

Structure

Tables are a configurable and customizable component. Designers can pick and choose certain elements and interactions. The basic table style is the required base from which tables can be developed. Basic tables are composed of a header row followed by rows of data below.

ElementPropertypx / remSpacing token
Table headermargin-top16 / 1$spacing-05
margin-bottom24 / 1.5$spacing-06
padding left, padding right16 / 1$spacing-05
Sort iconpadding8 / 0.5$spacing-03
Before and after textpadding-left, padding-right16 / 1$spacing-05
Data table structure

Structure and spacing measurements for a basic data table | px/rem

Columns

Column widths can vary by content and only require a minimum spacing between columns. Tables require three or more columns.

Spacing betweenPropertypx / remSpacing token
Columnspadding16 /1$spacing-05
Data table column measurements

Structure and spacing measurements for columns in a data table | px/rem

Rows

Row sizes are customizable. The column header row should always match the row size of the table. Column header and row text is always centered in the row with the expecption of the extra large which is offset by padding-top: 16px. Extra large row heights are only recommended if your data is expected to have two lines of content in a single row.

SizeHeight (px / rem)
Extra small (xs)24 / 1.5
Small (sm)32 / 2
Medium (md)40 / 2.5
Large (lg)48 / 3
Extra large (xl)64 / 4
data table row sizes

Enhancements

After the simple table structure, tables can be enhanced by adding any of the following: selectable rows, expanding rows, row menus, table batch actions, overall table menu, and/or table filter.

ElementPropertypx / remSpacing token
Checkboxheight, width20 / 1.25
padding-left, padding-right16 / 1$spacing-05
Radio buttonheight, width20 / 1.25
padding-left, padding-right16 / 1$spacing-05
Overflow menu (sm)height32 / 2
Chevron iconsvg16 / 1
click target32 / 2$spacing-07
padding-left, padding-right16 / 1$spacing-05
Expanded panelpadding-top, padding-right16 / 1$spacing-05
padding-left48 / 3$spacing-09
padding-bottom24 / 1.5$spacing-06
Data table with selection measurements

Structure and spacing measurements for selected row | px/rem

Data table expanded row measurements

Structure and spacing measurements for expanded row | px/rem

Data table with expansion and selection measurements

Structure and spacing measurements for expanded and selected row | px/rem

Toolbar

The large 48px toolbar is paired with the extra large and large row sizes. The small toolbar is paired with the small and extra small row sizes.

ElementPropertypx / remSpacing token
Toolbar: largeheight, width48 / 3
margin-top, margin-bottom16 / 1$spacing-05
Toolbar: smallheight, width32 / 2
margin-top, margin-bottom8 / 0.5$spacing-03
Data table toolbar measurements

Structure and spacing measurements for toolbar | px/rem

Batch action bar

The large 48px batch action bar is paired with the extra large and large row sizes. The small batch action bar is paired with the small and extra small row sizes.

ElementPropertypx / remSpacing token
Batch action bar: largeheight48 / 3
Buttonsize48px
Batch action bar: smallheight32 / 2
Buttonsize32px
Before and after textpadding-left, padding-right16 / 1$spacing-05
Button: iconpadding-right16 / 1$spacing-05
Data table batch action bar measurements

Structure and spacing measurements for batch action bar | px/rem

AI presence

The following are the unique styles applied to the component when the AI label is present. Unless specified, all other tokens in the component remain the same as the non-AI variant.

For more information on the AI style elements, see the Carbon for AI guidelines.

Entire table
ElementPropertyToken / Size
Data table:backgroundbackground-color$layer *
box-shadow$ai-drop-shadow
inner-shadow$ai-inner-shadow
Linear gradient:backgroundstart$ai-aura-start-sm
stop$ai-aura-stop
Linear gradient:bordertop$ai-border-start
bottom$ai-border-end
AI labelsizelarge
AI Data table

Structure and spacing measurements for entire data table generated by AI.

Individual cells
ElementPropertyToken / Size
Inline AI labelsizemedium
Data table with AI generated cells

Structure and spacing measurements for individual cells of a data table generated by AI.

Rows and columns
ElementPropertyToken / Size
Linear gradient:backgroundstart$ai-aura-start-sm
stop$ai-aura-stop
Linear gradient:borderleft, top$ai-border-strong
AI labelsizemini
Data table with AI generated rows and columns

Structure and spacing measurements for rows and columns of a data table generated by AI.

AI Data table hover interaction

Hover interaction for an AI generated row.