App components / Tables
Table
Rows of records in one flat card: a toolbar, mono capital headers, selectable rows that tint when chosen, status pills, right-aligned mono numbers and a footer for counts and pages. Built from small pieces, so each table takes only what it needs.
Code
The component itself, ready to drop into your project. Switch between React, Vue and plain HTML; every version uses the same Tailwind classes on Ochre's tokens.
| Invoice | Customer | Status | Issued | ||
|---|---|---|---|---|---|
| INV-2041 | Northwind Traders billing@northwind.com | Paid | 28 Oct | £4,280.00 | |
| INV-2040 | Halcyon Labs ap@halcyon.io | Due | 27 Oct | £1,920.50 | |
| INV-2039 | Fieldnote finance@fieldnote.app | Overdue | 14 Oct | £760.00 | |
| INV-2038 | Maya Shah maya@shah.studio | Paid | 12 Oct | £12,450.00 | |
| INV-2037 | Copperline accounts@copperline.co | Draft | 9 Oct | £318.75 |
Installation
Examples
Rows arriving and sorting
New payouts rise in at the top; the sort chevron turns over as you change direction.
Payouts
| Payout | Account | Status | |
|---|---|---|---|
| PO-3106 | Northwind Traders | Paid | £4,820 |
| PO-3105 | Halcyon Labs | Paid | £1,290 |
| PO-3104 | Fieldnote | Paid | £7,340 |
Simple
Read-only figures with a totals row.
| Region | Accounts | MRR | Churn |
|---|---|---|---|
| United Kingdom | 1,284 | £48,213 | 1.8% |
| Germany | 902 | £31,940 | 2.1% |
| United States | 2,210 | £96,502 | 2.6% |
| India | 640 | £9,880 | 3.4% |
| Total | 5,036 | £186,535 | 2.4% |
Compact
40 pixel rows for logs and deploys.
| Commit | Branch | Author | Status | Started | Took |
|---|---|---|---|---|---|
| a41f9c2 | main | Maya Shah | Live | 09:42 | 1m 12s |
| 7be0d13 | billing-caps | Tom Okafor | Building | 09:31 | 0m 48s |
| c90e6a7 | main | Ines Duarte | Failed | 08:55 | 2m 03s |
| 1d2b8f0 | main | Maya Shah | Superseded | Yesterday | 1m 09s |
Sizes and rows
S 32 to XXL 64 rows, with five or ten of them.
Accounts
5| Account | Plan | Status | ARR |
|---|---|---|---|
| Northwind Traders | Enterprise | Active | £48,213 |
| Halcyon Labs | Team | Active | £12,940 |
| Fieldnote | Team | Trial | £0 |
| Copperline | Starter | Active | £2,180 |
| Maya Shah Studio | Starter | Paused | £640 |
Cell types
Checkbox, text, text with detail, person, badge, progress, number and actions.
| Id | Project | Lead | Status | Progress | Budget | Actions | |
|---|---|---|---|---|---|---|---|
| NW-118 | Billing caps for teamsPayments | Maya ShahProduct designer | On track | 72% | £18,400.00 | ||
| NW-121 | Q3 roadmap reviewPlanning | Sam OkaforProduct lead | At risk | 38% | £4,200.00 | ||
| NW-124 | Invoice exportsReporting | Ines DuarteEngineer | Done | 100% | £9,650.00 |
Groups and selection header
Group headers collapse their rows. Select a row and the header turns into the selection header. A split button exports.
Issues
51 selected | ||||
| NW-118Billing caps for teams | Maya Shah | In progress | 31 Oct | |
| NW-121Q3 roadmap review | Sam Okafor | In progress | 4 Nov | |
| NW-126Seat limits on the Team plan | Ines Duarte | To do | 11 Nov | |
| NW-127Usage email for admins | Tom Okafor | To do | 14 Nov | |
Editing, details and totals
Edit quantity and price in place, open a row for its note, sort or hide from the column menus. The totals row follows.
| Details | Unit price | |||
|---|---|---|---|---|
| Team plan seats | £288.00 | |||
Note Annual, billed in November. | ||||
| Extra storage | £120.00 | |||
Note Three blocks of 500 GB for the design team. | ||||
| Onboarding sessions | £360.00 | |||
Note Booked with Sam Okafor for 4 and 11 Nov. | ||||
| Total | £768.00 | |||
Motion
Built on Ochre's ease-out curves. With reduced motion switched on, everything still works, it just doesn't move.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| TableCard | HTMLAttributes | – | The flat card around the toolbar, table and footer. |
| TableToolbar / TableFooter | HTMLAttributes | – | Rows above and below the table, split by hairlines. |
| Table size | "s" | "m" | "l" | "xl" | "xxl" | "xl" | Row height for the header, rows and cells together: 32, 40, 48, 56 or 64 pixels. |
| Table density | "default" | "compact" | "default" | The older switch, still supported: default is XL, compact is M. |
| Tr selected | boolean | – | Tints the row smoothly and sets aria-selected. |
| Tr isNew | boolean | – | The row rises in when it mounts. Add style={{ "--i": n }} to stagger several. |
| Th numeric / Td numeric | boolean | – | Right-aligned; Td also mono with tabular figures. |
| Th sort | "ascending" | "descending" | "none" | – | Sets aria-sort. Pair it with a SortButton inside. |
| SortButton | ButtonHTMLAttributes & { sort, numeric } | – | Header button: a faint up and down pair when unsorted, one chevron that turns over when sorted. |
| TableCheckbox | InputHTMLAttributes & { indeterminate } | – | Orange when checked; a dash when indeterminate. |
| TableStatus | { tone: "neutral" | "accent" | "success" | "warning" | "danger" | "info" } | – | A soft pill with a dot for a status cell. |
| TableDetail / TablePerson | { primary, detail } / { name, detail, initials } | – | Text with detail, and a person with their initials in a circle. |
| TableProgress | { value: number; tone?: "neutral" | "accent"; label?: string } | – | A thin bar and the percentage in mono. |
| TableRowActions | { label; items?: DropdownMenuEntry[] } | – | The ⋯ button at the end of a row; with items it opens a menu. |
| GroupHeader | { label; count; expanded; onToggle; colSpan; controls? } | – | Heads a group of rows with its count and a collapse toggle. |
| SelectionHeader | { count; total; onToggleAll; onClear?; actions?; colSpan } | – | Put in THead in place of the header row while rows are selected. |
| EditableCell | TdHTMLAttributes & { value; onValueChange; label; numeric?; format? } | – | Click, Enter or F2 edits in place; Enter or leaving saves, esc cancels. |
| ExpandButton / ExpandedRow | { expanded; controls; label } / { open; colSpan; id } | – | The chevron at the start of a row, and the details row it opens. |
| TFoot / TotalsRow | { label?; labelSpan? } | – | The last row, with totals in mono. Children are the total cells. |
| ColumnMenu | { label; sort; onSortChange; onHide?; items?; numeric? } | – | Header button whose menu sorts either way, clears, hides the column and holds extra items. |
| Vue extras | size, group-by, totals, #bulk-actions, #expanded, column.editable, column.menu, v-model:hidden | – | The data-driven Vue table has the same parts as props and slots; edits emit edit(row, key, value). |
Usage
Use it for
- Records people compare, sort and act on in bulk: invoices, members, deploys.
- Compact density for logs and dense admin views; default everywhere else.
- Numbers right-aligned in mono so the digits line up.
Avoid
- A table for one or two fields per record: use a list.
- Colour for anything but status. Falling numbers stay grey, not red.
- Hiding the selection count: the toolbar says how many are selected and what you can do with them.