Components / Data display / Data table

D3 · Data display

Data table

A dense table with a sticky header, a heat column, a mini bar, and a sparkline.

When to use

  • Readers scan many records on the same fields.
  • A column encodes a number with colour and a digit.

When not to use

  • There are fewer than four records.
  • The layout is a form.

Usage

<table class="c-dense">
  <thead><tr><th>Document</th><th class="num">Age</th><th class="num">Change</th></tr></thead>
  <tbody><tr><td class="num">DOC-1042</td><td class="num">6</td><td class="num bad">−2</td></tr></tbody>
</table>

Variants

The preview shows the form used in the gallery.

Props

NameTypeDefaultDescription
c-denseclass—Sticky header inside c-scroll.
heat cellstyle—Flat tint from the signed change. The number remains.
c-bar0–100%—Completeness. The percent is also text.
sparklinesvg—Seven touches. Decorative; the table still names the row.

Keyboard

KeyAction
TabMoves past the table. Cells are not a grid widget.
Arrow keysScroll the overflow region when it is focused.

Accessibility

Motion

Pattern origin

Pattern type: a dense table with heat, bars, and sparklines.

Related

Expandable rowKPI tilesLine chart