Skip to content
RefineUI

Table

Data grid table for structured records.

BillingLast 30 days

Invoices

Recent payments and outstanding balances.

InvoiceCustomerStatusMethodAmount
INV-001Acme StudioPaidCard$1,250.00
INV-002NorthwindPendingTransfer$890.00
INV-003ContosoPaidCard$420.50
INV-004FabrikamFailedInvoice$64.00
Total$2,624.50
Four invoices in this period.

Overview

Machine-readable contract from Component Spec.

component: tableexport: Tableversion: 1attributes: data-refineui=table

Anatomy

Partdata-refineui
roottable
rowtable-row

Layout

PropertyValue
directionlogical
rtltrue
npm install @refineui/react @refineui/tokens
import {
Table,
TableHeader,
TableBody,
TableFooter,
TableRow,
TableHead,
TableCell,
TableCaption
} from "@refineui/react";
<Table>
<TableCaption>Product inventory</TableCaption>
<TableHeader>
<TableRow>
<TableHead>Product</TableHead>
<TableHead>Price</TableHead>
<TableHead>Stock</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow>
<TableCell>Widget A</TableCell>
<TableCell>$19.99</TableCell>
<TableCell>52</TableCell>
</TableRow>
<TableRow>
<TableCell>Widget B</TableCell>
<TableCell>$29.99</TableCell>
<TableCell>12</TableCell>
</TableRow>
</TableBody>
<TableFooter>
<TableRow>
<TableCell colSpan={2}>Total Items</TableCell>
<TableCell>64</TableCell>
</TableRow>
</TableFooter>
</Table>

Table does not own overflow. Compose with ScrollArea when width is constrained (docs column, panel) or height is constrained (dialog, fixed layout). Specimen previews that fit the stage usually skip ScrollArea.

import {
ScrollArea,
ScrollAreaViewport,
ScrollAreaScrollbar,
ScrollAreaThumb,
Table,
TableHeader,
TableBody,
TableRow,
TableHead,
TableCell,
} from "@refineui/react";
<ScrollArea type="hover" className="w-full min-w-0">
<ScrollAreaViewport>
<Table>
<TableHeader>{/* … */}</TableHeader>
<TableBody>{/* … */}</TableBody>
</Table>
</ScrollAreaViewport>
<ScrollAreaScrollbar orientation="horizontal">
<ScrollAreaThumb />
</ScrollAreaScrollbar>
</ScrollArea>

Root table element.

Table header section (<thead>).

Table body section (<tbody>).

Table footer section (<tfoot>).

Table row (<tr>).

Header cell (<th>).

Data cell (<td>).

Table caption for accessibility.