Components / Data display / Expandable row

D2 · Data display

Expandable row

A row opens a panel with a sparkline, a key-value grid, and holders.

When to use

  • A table row has a second layer of fields.
  • Readers compare rows before opening one.

When not to use

  • Every field belongs in the row.
  • The detail is a separate destination with its own URL.

Usage

<tr>
  <td><button type="button" class="btn sm ghost" aria-expanded="false" aria-controls="panel-DOC-1042">Details</button></td>
  <td class="num">DOC-1042</td><td>Access policy</td>
</tr>
<tr id="panel-DOC-1042" hidden><td colspan="3">Owner A. Rahim · Age 6 days</td></tr>

Variants

The preview shows the form used in the gallery.

Props

NameTypeDefaultDescription
aria-expandedtrue or falsefalseWhether the panel is open.
aria-controlsid—Id of the detail row.
sparklinesvg—Touches across seven example points.

Keyboard

KeyAction
Enter or SpaceOn Details, opens or closes the panel.
TabMoves to the next Details button.

Accessibility

Motion

Pattern origin

Pattern type: a row that expands into a detail panel.

Related

Data tableLine chart