Library navigation
A summary of your recent invoices.
InvoiceStatusMethodAmount
INV-001PaidCredit card$250.00
INV-002PendingBank transfer$150.00
INV-003PaidCredit card$350.00
Total$750.00

Table

A responsive table with composable headers, rows, cells, a caption, and an optional footer. Wide tables scroll horizontally.

Installation

bunx shadcn@latest add https://ui.razeev.com/r/table.json

Usage

tsx
import {
Table, TableHeader, TableBody, TableRow,
TableHead, TableCell, TableCaption,
} from "@/components/hangry-ui/components/table";
<Table>
<TableCaption>Team members and their roles.</TableCaption>
<TableHeader>
<TableRow>
<TableHead>Name</TableHead>
<TableHead>Role</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow>
<TableCell>Alex Morgan</TableCell>
<TableCell>Designer</TableCell>
</TableRow>
</TableBody>
</Table>

Props

PropTypeDefaultDescription
Table.childrenReactNode—Compose the caption, header, body, and footer.
Table.classNamestring—Additional classes on the table element. The wrapper scrolls horizontally.
TableHeader / TableBody / TableFooter.childrenReactNode—TableRow elements within each section.
TableRow.childrenReactNode—TableHead or TableCell elements.
TableRow.data-statestring—Set to "selected" to highlight a row.
TableHead.scope"col" | "row" | "colgroup" | "rowgroup""col"Associates a header with columns or rows.
TableHead / TableCell.colSpannumber1 (browser default)Number of columns a cell spans.
TableHead / TableCell.rowSpannumber1 (browser default)Number of rows a cell spans.
TableHead / TableCell.childrenReactNode—Cell content.
TableCaption.childrenReactNode—Accessible description of the table.
classNamestring—Each table part accepts additional classes.
Native propsComponentProps<"table" | "thead" | "tbody" | "tfoot" | "tr" | "th" | "td" | "caption">—Each part forwards the native attributes and event handlers of its corresponding element.

Setup notes

Use the global theme tokens and Tailwind CSS v4. Borders use border-border, with no rounded classes. Use TableHead scope="row" for row headers, TableCaption to describe the table, and TableFooter for summary rows. Sorting and pagination can be composed separately.