Table

A semantic HTML table component for displaying structured data in rows and columns.

A list of your recent invoices.
InvoiceStatusMethodAmount
INV001PaidCredit Card$250.00
INV002PendingPayPal$150.00
INV003UnpaidBank Transfer$350.00
INV004PaidCredit Card$450.00
INV005PaidPayPal$550.00

Installation

pnpm dlx stera-ui add table

Usage

import {
  Table,
  TableHeader,
  TableBody,
  TableFooter,
  TableHead,
  TableRow,
  TableCell,
  TableCaption,
} from "@/components/ui/table"
<Table>
  <TableHeader>
    <TableRow>
      <TableHead>Name</TableHead>
      <TableHead>Status</TableHead>
    </TableRow>
  </TableHeader>
  <TableBody>
    <TableRow>
      <TableCell>Invoice #001</TableCell>
      <TableCell>Paid</TableCell>
    </TableRow>
  </TableBody>
</Table>
A list of your recent invoices.
InvoiceStatusMethodAmount
INV001PaidCredit Card$250.00
INV002PendingPayPal$150.00
INV003UnpaidBank Transfer$350.00
INV004PaidCredit Card$450.00
INV005PaidPayPal$550.00
Total$1,750.00

TableFooter renders a sticky-style summary row at the bottom of the table.

API Reference

Subcomponents

ComponentDescription
TableHeader<thead> wrapper
TableBody<tbody> wrapper
TableFooter<tfoot> wrapper
TableRow<tr> element
TableHead<th> column header cell
TableCell<td> data cell
TableCaptionAccessible caption rendered below the table