4.2.0
Core

Table

Semantic table wrappers: a header rule, a row rule, and nothing else.

Table

A header rule, a row rule, and nothing else — no zebra striping, no rounded cells, no shadow. These are wrappers around real `<table>` markup, so a screen reader navigates the result by column and row; the styling is the only thing the package owns.

The cost column carries its own font-mono and tabular-nums; the wrappers do not.
ServiceRegionSizeMonthly
apieu-west-12 vCPU€48.00
workereu-west-11 vCPU€24.00
edgeglobal—€6.40

Usage

import {
  Table,
  TableBody,
  TableCaption,
  TableCell,
  TableFooter,
  TableHead,
  TableHeader,
  TableRow,
} from '@oceanic-hub/brand-system'
<Table>
  <TableCaption>…</TableCaption>
  <TableHeader>
    <TableRow>
      <TableHead>…</TableHead>
    </TableRow>
  </TableHeader>
  <TableBody>
    <TableRow>
      <TableCell>…</TableCell>
    </TableRow>
  </TableBody>
</Table>

Composition

Use the following composition to build a Table:

Table
├── TableCaption
├── TableHeader
│   └── TableRow
│       └── TableHead ×4
├── TableBody
│   └── TableRow
│       └── TableCell ×4
└── TableFooter
    └── TableRow
        └── TableCell ×2

No zebra striping, no rounded cells, no shadow — and no tabular-nums either: a numeric column is className="font-mono tabular-nums" on the cells that hold numbers, because only the surface knows which columns those are.

Table already wraps itself in an overflow container; add a ScrollArea when you want the styled scrollbar too.

This is the primitive; DataTable is the composite over it. Here the markup is yours — you write every <tr> and every <td>, which is what buys real table semantics: a screen reader navigates the result by row and column, a colSpan in a footer means what it says, and a cell can hold anything. Reach for these whenever the table is a shape you want to control. DataTable answers a different question, and its own page states what it takes.

It is markup, not a data grid. There is no columns, no data, no sort: sorting, column sizing and virtualisation stay with the surface, because a brand package that owned them would be dictating product behaviour. Upstream answers the same question by pairing its table with @tanstack/react-table — a dependency this package does not take, and does not need to, since these wrappers compose with whichever one a product picks.

RTL is not supported. Upstream's page answers direction with a global RTL configuration guide; we have none, because nothing in this package has ever been laid out or measured right-to-left. Advertising support we have not measured is the failure mode this repo refuses everywhere else.

Selected row

selected is the typed way into the bg-brand-soft treatment — no data-* cast needed.

ServiceRegionSize
apieu-west-12 vCPU
workereu-west-11 vCPU
edgeglobal—

TableFooter is a real <tfoot>, so a total stays attached to the table it sums — in a print, in a screen reader's table navigation, and under a body that scrolls. colSpan the label across the columns it does not add up, and keep the number on the same tabular column as the ones above it.

ServiceRegionMonthly
apieu-west-1€48.00
workereu-west-1€24.00
edgeglobal€6.40
Total€78.40

Row actions

Put per-row controls in a last, right-aligned column behind a DropdownMenu, so the row still reads as data and one kebab stands in for however many verbs the row has. Open the menu align="end" — anchored to the trigger's right edge it stays over its own column instead of spilling across the table.

ServiceRegionActions
apieu-west-1
workereu-west-1
edgeglobal

API Reference

See the Table API page for every prop of every part, with types, defaults and the contract that pins them.

On this page