Tables display a set of data in an organized tabular format.

Anatomy

Anatomy elements
#RequiredElementDescription
1ContainerThe root table element. Wraps all rows and cells.
2Column headerLabels each column. Can be made clickable.
3RowA single data set entry.

Guidelines

The Table is a component used to display sets of data in an organized, tabular format. Compared to our DataTable component, it's less opinionated and custom, but more than suitable for basic data sets.

Tables for layout

Historically, HTML tables were once used to arrange elements on a webpage before modern CSS layout tools like Flexbox and Grid existed. Never use the Table for layout purposes. We provide components specialized in building layouts such as the Box and Grid. For more information and the full list of available components, see our "Layout" section under "Components."

Table vs. DataTable

The Table and DataTable components are very similar but play a different role in how the user interacts with the data displayed:

  • Tables are low-level components used to display data in a read-only basis. For the most basic use cases, a Table is preferred.
  • DataTables are feature-rich custom components build on top of the Table. They are suited for more complex interactions such as sorting, filtering, pagination, and column management that the Table component cannot handle.

Appearance

Layout

Layout determines how the Table distributes column widths. The default auto layout allows columns to adjust to content size. Fixed layout divides columns equally regardless of content, providing predictable sizing.

Auto layout table
ProductCategoryPrice
Ceramic vaseHome$45
Leather journalOffice$28
Cotton blanketHome$62
Auto

Columns adjust to fit their content. This behavior is default and is suitable for most Tables.

Fixed layout table
ProductCategoryPrice
Ceramic vaseHome$45
Leather journalOffice$28
Cotton blanketHome$62
Fixed

Columns are divided equally regardless of content size. Use for predictable Table sizing when all columns carry similar amounts of data.

Row styles

Beyond the default bordered rows, the Table supports striped and borderless styles.

Borderless rows remove the separator between entries for a cleaner presentation. Striped rows alternate between two background colors to improve readability in data-dense Tables.

Default style
ProductCategoryPrice
Ceramic vaseHome$45
Leather journalOffice$28
Cotton blanketHome$62
Default

Rows have a consistent background with a border separating each entry. Suitable for most use cases.

Borderless style
ProductCategoryPrice
Ceramic vaseHome$45
Leather journalOffice$28
Cotton blanketHome$62
Borderless

Borders between rows are removed for a cleaner visual presentation. Best suited for smaller datasets.

Striped style
ProductCategoryPrice
Ceramic vaseHome$45
Leather journalOffice$28
Cotton blanketHome$62
Striped

Alternating background colors improve readability for Tables with many rows of similarly structured data.

Behaviors

States

Base state
ProductCategoryPrice
Ceramic vaseHome$45
Leather journalOffice$28
Cotton blanketHome$62
Base

The default resting state displays data with bordered rows and a subtle header background.

Header hover state
Ceramic vaseHome$45
Leather journalOffice$28
Header hover

Clickable column headers change background color and text color on hover to indicate they can be activated.

Row hover state
ProductCategoryPrice
Ceramic vaseHome$45
Leather journalOffice$28
Cotton blanketHome$62
Row hover

When hover highlighting is enabled, rows change background color on mouse hover to indicate interactivity.

Header focus state
Ceramic vaseHome$45
Leather journalOffice$28
Header focus

Focused headers receive the standard 2px light blue outline.

Active header state
Ceramic vaseHome$45
Leather journalOffice$28
Active header

The active state highlights a column header in the accent color, typically used to indicate the current sort column.

Depth padding

Table cells support depth-based padding for tree-like or nested table patterns. When enabled on a cell, additional inline-start padding is calculated based on a nesting level, visually indenting child rows to convey hierarchy.

Category breakdown
CategoryItemsRevenue
Electronics150$45,000
Smartphones89$32,000
Laptops61$13,000
Furniture203$28,500
Depth padding

Child rows are indented with padding based on a prop on the first cell and the depth prop on the row.

Panel alignment

When a Table is placed inside a Panel, edge cells (first and last in each row) automatically inherit the Panel's content padding. This ensures that Table content aligns flush with the Panel's borders without manual padding adjustments.

Inventory

Product inventory
ProductCategoryPrice
Ceramic vaseHome$45
Leather journalOffice$28
Cotton blanketHome$62
Table in a Panel

Edge cells align with the Panel's content area for a cohesive layout.

Content

Caption

Table captions are important for providing assistive technology information about the Table's purpose and the type of data it contains. Short, descriptive nouns or noun phrases work best for captions.

Product inventory
Do: Use a short, descriptive label that identifies the data.
A table showing all products in the current inventory system
Don't: Use full sentences or redundant descriptions.

Column headers

Column headers should clearly label the data in each column. Write headers in sentence case and avoid abbreviations where possible.

Clear headers
Product nameCategoryUnit price
Ceramic vaseHome$45
Do: Use full words in sentence case.
Abbreviated headers
Prod nmCatUP
Ceramic vaseHome$45
Don't: Use abbreviated header or title case.