Patterns
Table
Static data table with semantic header, body, and row structure
import { Table } from '@amezquita/design-system/components/patterns/Table'Live render
| Token | Value |
|---|---|
| space-inline-gap | 8px |
| space-element-gap | 16px |
Props
| Prop | Type | Description |
|---|---|---|
striped? | boolean | |
bordered? | boolean | |
compact? | boolean | |
className? | string | |
scrollLabel? | string | Accessible name for the scroll region — override when a page has more than one table. |
children | React.ReactNode |
Tokens
| Token | Type | Value |
|---|---|---|
--table-header-font-weight | fontWeight | 600 |
Usage example
<Table>
<TableHead>
<TableRow>
{sampleHeaders.map(h => <TableHeader key={h}>{h}</TableHeader>)}
</TableRow>
</TableHead>
<TableBody>
{sampleRows.map(row => (
<TableRow key={row[0]}>
{row.map((cell, i) => <TableCell key={i}>{cell}</TableCell>)}
</TableRow>
))}
</TableBody>
</Table>Sub-components
Imported from the same path as Table.