Skip to main content
Table
@coinbase/cds-web@8.34.1
Displays data in rows and columns.
Import
import { Table } from '@coinbase/cds-web/tables/Table'
SourceView source codeStorybookView Storybook
View as Markdown

CDS Data Tables allow product teams to place their content in an organized display of rows and columns enabling them to group their data by different classifications so their product users can make comparisons, glean insights and make informed decisions.

Display of content in rows and columns allows data to be organized for further analysis, allowing large amounts of raw data to be sorted and reorganized in a neat format, and allows the inclusion of only the most important or relevant data.

Principles

A defining element of CDS Data Tables is the ability to "manipulate" the data view. This defining attribute is represented in the table header row; the first row of a table.

The table header row not only labels the columns with a descriptive title but it also provides functionality to re-organize or re-configure what is being displayed in the corresponding cols.

A Data Table requires a header row. However it is not required that a header row have actions (sorting, filtering, etc.)

When to use

Use Data Tables when you want to:

  • Organize data that is too detailed or complicated to be described adequately in the text
  • Show many numerical values and other specific data in a small space
  • Compare and contrast data values with several shared characteristics or variables
  • Organize the order of content

Data Tables can contain:

  • Static/Read-only content (text/strings, labels, etc)
  • Interactive elements (input fields, buttons, etc)
  • Actions to query and/or manipulate data (sorting, filtering, etc)

Cross-Platform

Data Tables are intended for and built for desktop screens. When displaying complex data sets on mobile devices we recommend using CDS Lists View.

Complicated tables

Sometimes you need to use a more complicated layout to fit your data. That's okay, but please be aware more complex tables come with... more complexity 🤯

Accessibility

Accessibility tip

Tables should have an accessible label for people using assistive technologies. The preferred and most semantic method is to add a TableCaption as the first child of your Table component (see code examples below). However, if you need more flexibility or your design does not include a caption or title, you can set a label using the accessibilityLabelledBy or accessibilityLabel props.

Table Variants

The Table component supports three variants: default, graph, and ruled.

Loading...

Basic usage with Layout Control

Loading...

Cell Spacing and Compact Mode

Loading...

Height-Constrained Table with Sticky Header

Loading...

Complex Table Structure with Row/Column Spans

Loading...

Sortable Table

Loading...

Is this page useful?

Coinbase Design is an open-source, adaptable system of guidelines, components, and tools that aid the best practices of user interface design for crypto products.