Installation
Complete project setup first. Your configuration
must select react/aria and include your Design System ID.
pnpm exec frontfriend download table -f react --primitive ariaReview dependencies reported by the downloader and keep your source changes in version control.
Usage
import {
Table,
TableCaption,
TableHeader,
TableRow,
TableHead,
TableBody,
TableCell,
} from "@/components/ui/table";
<Table aria-label="Recent payments">
<TableCaption>Recent payments</TableCaption>
<TableHeader>
<TableRow>
<TableHead>Invoice</TableHead>
<TableHead>Amount</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow>
<TableCell>INV-001</TableCell>
<TableCell>$250.00</TableCell>
</TableRow>
</TableBody>
</Table>; Examples
Default
import {
Table,
TableCaption,
TableHeader,
TableRow,
TableHead,
TableBody,
TableCell,
} from "@/components/ui/table";
<Table>
<TableCaption>Recent payments</TableCaption>
<TableHeader>
<TableRow>
<TableHead>Invoice</TableHead>
<TableHead>Status</TableHead>
<TableHead>Amount</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow>
<TableCell>INV-001</TableCell>
<TableCell>Paid</TableCell>
<TableCell>$250.00</TableCell>
</TableRow>
<TableRow>
<TableCell>INV-002</TableCell>
<TableCell>Pending</TableCell>
<TableCell>$150.00</TableCell>
</TableRow>
</TableBody>
</Table>; API reference
Frontfriend-owned props. Native HTML and inherited primitive props remain documented by React Aria.
Table
| Prop | Type | Default | Description |
|---|---|---|---|
containerClassName | string | — |
TableEmpty
| Prop | Type | Default | Description |
|---|---|---|---|
colSpan | number | 1 |
Configuration determines the actual classes and available styling hooks. See Theming & component configuration before introducing a repeated local override.