+234 Design System

Table

Tabular figures that line up. A thick rule under the header, hairlines between rows, numbers right-aligned and tabular.

When to use it

Equities, with deltas

EquityLastChange
UBA38.501.20
BUA Foods412.006.50
Dangote Cement505.900.00
Zenith Bank44.150.65
MTN Nigeria268.002.00
HTML
<table class="p234-table">
  <thead><tr><th>Equity</th><th>Last</th><th>Change</th></tr></thead>
  <tbody>
    <tr><td>UBA</td><td>38.50</td><td><span class="p234-delta" data-direction="up">1.20</span></td></tr>
    <tr><td>BUA Foods</td><td>412.00</td><td><span class="p234-delta" data-direction="down">6.50</span></td></tr>
    <tr><td>Dangote Cement</td><td>505.90</td><td><span class="p234-delta">0.00</span></td></tr>
    <tr><td>Zenith Bank</td><td>44.15</td><td><span class="p234-delta" data-direction="up">0.65</span></td></tr>
    <tr><td>MTN Nigeria</td><td>268.00</td><td><span class="p234-delta" data-direction="down">2.00</span></td></tr>
  </tbody>
</table>

Alignment

The first column is text and stays left. Every other column is right-aligned and tabular, so digits of different magnitudes stack and the eye can run down the column. This is handled by the component; individual cells need no classes.

Rules, not stripes

A thick rule under the header and hairlines between rows. No zebra striping and no cell borders: on an editorial page the rule is enough, and stripes add noise to the thing a reader is trying to scan.

On a phone

Most readers are on a phone, so a table with more than three columns needs a plan: either drop columns at narrow widths, or let the table scroll horizontally inside a wrapper with a visible edge. Never shrink the type below the floor to make columns fit.

Accessibility

Tokens this component reads

--p234-color-ink--p234-color-ink-muted--p234-color-rule--p234-type-data-*--p234-type-ui-sm-*--p234-space-3--p234-space-4--p234-border-hairline--p234-border-thick