Table

Full-width, collapsed borders, a heavier rule under the header row.

ClassDoes what
tableFull-width table with bottom-bordered cells

Basic

<table class="table prose">
  <thead>
    <tr><th>Token</th><th>Purpose</th></tr>
  </thead>
  <tbody>
    <tr><td><code>--primary</code></td><td>The brand colour</td></tr>
    <tr><td><code>--secondary</code></td><td>Links</td></tr>
    <tr><td><code>--error</code></td><td>Invalid inputs</td></tr>
  </tbody>
</table>

Composition

Common ways to put this together with other components. The general rules are on Composition.

A table with a heading and status badges

A bordered block holds the heading and the table, and a badge marks each row's state.

Same markup in both builds
<section class="card-border">
  <div class="prose"><h3>Invoices</h3></div>
  <table class="table">
    <thead><tr><th>Month</th><th>Amount</th><th>Status</th></tr></thead>
    <tbody>
      <tr><td>September</td><td>$1,200</td><td><span class="badge">Paid</span></td></tr>
      <tr><td>October</td><td>$1,200</td><td><span class="badge">Due</span></td></tr>
    </tbody>
  </table>
</section>

Details in a card

Labels down the left, values on the right, closing with an action.

Same markup in both builds
<article class="card">
  <div class="prose"><h3>Order details</h3></div>
  <table class="table">
    <tbody>
      <tr><th>Placed</th><td>October 3</td></tr>
      <tr><th>Items</th><td>2</td></tr>
      <tr><th>Total</th><td>$48.00</td></tr>
    </tbody>
  </table>
  <footer class="card-actions flex" style="justify-content: end">
    <button class="btn btn-secondary">Download receipt</button>
  </footer>
</article>