InstallComponentsExample

Table

Data tables with quiet headers, hover rows and tabular numbers.

How it helpsNative table markup. Wrap it in .table for a border and horizontal scroll on phones.

Transactions

DatePayeeCategoryAmount
18 NovBlue TokaiDining−₹420
17 NovSalaryIncome+₹1,20,000
16 NovZerodha SIPInvest−₹10,000
export default function Example() {
  return (
    <>
      <div className="table-wrap w-full">
        <table>
          <thead><tr><th>Date</th><th>Payee</th><th>Category</th><th className="num">Amount</th></tr></thead>
          <tbody>
            <tr><td>18 Nov</td><td>Blue Tokai</td><td><span className="badge" data-tone="warn">Dining</span></td><td className="num" style={{ color: "var(--sd-bad)" }}>−₹420</td></tr>
            <tr><td>17 Nov</td><td>Salary</td><td><span className="badge" data-tone="good">Income</span></td><td className="num" style={{ color: "var(--sd-good)" }}>+₹1,20,000</td></tr>
            <tr><td>16 Nov</td><td>Zerodha SIP</td><td><span className="badge" data-tone="info">Invest</span></td><td className="num">−₹10,000</td></tr>
          </tbody>
        </table>
      </div>
    </>
  );
}
<div class="table-wrap w-full">
  <table>
    <thead><tr><th>Date</th><th>Payee</th><th>Category</th><th class="num">Amount</th></tr></thead>
    <tbody>
      <tr><td>18 Nov</td><td>Blue Tokai</td><td><span class="badge" data-tone="warn">Dining</span></td><td class="num" style="color:var(--sd-bad)">−₹420</td></tr>
      <tr><td>17 Nov</td><td>Salary</td><td><span class="badge" data-tone="good">Income</span></td><td class="num" style="color:var(--sd-good)">+₹1,20,000</td></tr>
      <tr><td>16 Nov</td><td>Zerodha SIP</td><td><span class="badge" data-tone="info">Invest</span></td><td class="num">−₹10,000</td></tr>
    </tbody>
  </table>
</div>

API

NameTypeDescription
.tableclassBordered, scrollable wrapper.
.numclassRight-aligned tabular numbers.