Table
Semantic HTML table with styled header, body, and optional footer rows.
Examples
Basic
Clean table with header and body rows.
Striped
Alternating row background for improved scannability.
With actions
Each row has contextual edit and delete actions.
With selection
Checkbox column for multi-row selection.
Sortable
Click column headers to toggle ascending / descending sort.
With Footer
Table with a summary footer row.
Installation
pnpm add @rokle/components @rokle/tokensInstalls with the default Rokle brand. Generate a custom brand on rokle.app to use your own colours and personality.
Usage
import { Table } from "@rokle/components";import { Table } from "@rokle/components";
export function Example() {
return <Table />;
}API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| columns | { key: string; header: string }[] | - | Column definitions. |
| data | Record<string, unknown>[] | - | Row data array. |
| caption | string | - | Accessible table caption. |