Table
A tabular data display built on the native <table>.
| Monitor | Status | Region | Response | Uptime (30d) | Last checked | Actions | |
|---|---|---|---|---|---|---|---|
| api.acme.dev | Up | Frankfurt | 142 ms | 99.98% | |||
| checkout.acme.dev | Degraded | N. Virginia | 912 ms | 99.21% | |||
| webhooks.acme.dev | Down | São Paulo | — | 96.12% | |||
| cdn.acme.dev | Checking | Sydney | 64 ms | 99.95% | |||
| docs.acme.dev | Paused | Oregon | — | 99.99% |
View code
<Table.Container>
<Table aria-label="Monitors">
<Table.Header>
<Table.Row>
<Table.SelectAll label="Select all monitors" />
<Table.Column>Monitor</Table.Column>
<Table.Column>Status</Table.Column>
<Table.Column>Region</Table.Column>
<Table.Column numeric>Response</Table.Column>
<Table.Column numeric>Uptime (30d)</Table.Column>
<Table.Column>Last checked</Table.Column>
<Table.ActionsColumn label="Actions" />
</Table.Row>
</Table.Header>
<Table.Body>
{monitors.map((monitor) => (
<Table.Row key={monitor.id}>
<Table.Select name="monitor" value={monitor.id} label={`Select ${monitor.name}`} />
<Table.Cell>
<Table.RowLink href={`/monitors/${monitor.id}`}>{monitor.name}</Table.RowLink>
</Table.Cell>
<Table.StatusCell color={monitor.status.color} pulse={monitor.checking}>
{monitor.status.label}
</Table.StatusCell>
<Table.Cell>{monitor.region}</Table.Cell>
<Table.NumberCell
value={monitor.responseMs}
locale="en"
format={{ style: "unit", unit: "millisecond" }}
/>
<Table.NumberCell
value={monitor.uptime}
locale="en"
format={{ style: "percent", minimumFractionDigits: 2 }}
/>
<Table.DateCell date={monitor.checkedAt} now={requestTime} locale="en" />
<Table.Actions overflowLabel="More actions">
<Table.Action>Pause</Table.Action>
<Table.Action danger>Delete</Table.Action>
</Table.Actions>
</Table.Row>
))}
</Table.Body>
</Table>
</Table.Container>Demo apps
Whole pages built only from @sdxc/ui, each for an invented product with its own palette and type. They open in a new tab.
- Food deliveryBocadoBocado, an invented food delivery app: restaurants by cuisine and delivery time, search with filters, menus with options, a cart, checkout and live order tracking on a drawn map./showcase/bocado/demo
- Issue trackerCairnCairn, an invented issue tracker: grouped issue lists with filters in the address, a drag-and-drop board, projects on a roadmap, cycles with burn-up charts and an inbox./showcase/cairn/demo
- Social networkChorusChorus, an invented social network: a live timeline with pictures, link cards, polls and threads, profiles, grouped notifications, search and messages./showcase/chorus/demo
- Code hostDeltaDelta, a code host whose one repository is its own source: a file tree beside the code, line links, blame and the commits list, every file and commit read from git when the site is built./showcase/delta/demo
- Online storeHangwellHangwell, an invented poster shop: collections with facet filters, product pages with format, size and frame pickers and a room preview, a bag, a checkout that adapts to print files, order tracking, downloads and returns./showcase/hangwell/demo
- CMSInkwellInkwell, a demo CMS built from @sdxc/ui/app: posts with count tabs and quick edit, an editor with a quiet save status and a loud Publish, media and settings./showcase/inkwell/demo
- Music streamingMurmurMurmur, an invented music service: home shelves, search by genre, a library, albums, playlists and artists, with a player that keeps playing while you browse./showcase/murmur/demo
- Team chatParleyParley, an invented team chat: channels and direct messages with unread and mention badges, threads, reactions, edits, pins, search, a quick switcher and teammates who type and post live./showcase/parley/demo
- Photo and video networkPinholePinhole, an invented social network for photographs and short videos: a feed under a story tray, full-screen stories, a vertical reels feed, profiles with highlights, Explore and posts with comments./showcase/pinhole/demo
- Ops dashboardPulsePulse, an invented ops dashboard: Northwind's services with live filters, a peek sheet and a bulk bar, metrics that switch one chart, incidents, deploys and settings./showcase/pulse/demo
- Support inboxRelayRelay, an invented support inbox: mailboxes, conversations and the open conversation on one screen, with contacts, reports and settings./showcase/relay/demo
- CalendarSundialSundial, an invented calendar: day, week and month views, an agenda, events you drag, resize and create on the grid, a second time zone, and a find-a-time view across a team in five zones./showcase/sundial/demo
- Chat assistantTernTern, an invented chat assistant: conversations with streamed replies, code and tables, projects, a canvas, sharing and settings./showcase/tern/demo
- Banking & budgetsTuppenceTuppence, an invented personal bank: multi-currency accounts, a statement by day with search and splits, spending and budgets, savings pots, bills ahead, cards that freeze and a transfer flow, all with fake money./showcase/tuppence/demo
- Streaming serviceVesperVesper, an invented streaming service: profiles, a home of sideways shelves under a billboard, series with seasons and episodes, search, My List and a theater player./showcase/vesper/demo
- Travel bookingWayfernWayfern, an invented travel app: stays, flights, cars and packages from one search, results on a real map, seat maps and boarding passes, and one itinerary of trips that exports to calendars./showcase/wayfern/demo
Every demo, landings and docs sites alike, is listed in the showcase.
Installation
An ordinary dependency: install it, import the theme once, and import the component where it is used.
npm add @sdxc/ui remiximport "@sdxc/ui/theme.css";Usage
import { Table } from "@sdxc/ui/app";Renders the <table> host: full width, border-collapsed, small text. density sets the row
height, pinFirstColumn keeps the first column in view with a scroll-driven edge shadow,
and aria-busy="true" dims the body while it refetches. Dev mode warns without a name.
Composition
The parts the component publishes, each a static property of the host.
TableTable.ContainerRenders the scrolling wrapper around Table: the table scrolls sideways inside it instead of widening the page, and the header sticks to its own top edge, whatever sticky offset the page around it sets.Table.HeaderRenders the<thead>host, whose header cells stick at--ui-app-sticky-top(below an app's own sticky bar) over an opaque surface, ruled from the body by an inset line that stays with them as they stick.Table.BodyRenders the table's<tbody>host: a block-start border rules the space between direct row children, andcontent-visibility: autolets a long body's off-screen rows skip layout and paint until they scroll into view.Table.ColumnRenders a column header inside a native<th scope="col">, aligned bydata-align.Table.SortLinkThe sortable header's cell-filling link, followed by its direction indicator held square, so a header narrow enough to squeeze the link keeps both arrows legible.Table.RowRenders a native<tr>host at the density's block size.Table.CellRenders a native<td>host, padded on every side and colored as the table's emphasized foreground text; anumericcell end-aligns tabular figures.Table.KeysTurns on keyboard row navigation for a server-rendered table:j/kand the arrows move through the rows with an inset ring, Enter oroopens the row's link,xtoggles its checkbox and/focuses the search field.Table.SelectAllRenders the selection column's header: a select-all checkbox markeddata-selection-all, and the TableSelection island that makes it check every row, show indeterminate while some are, and lets shift-click check a range.Table.SelectRenders one row's selection checkbox, markeddata-selection-itemwith the row's key as its value, so it submits with a form and any selection bar can count it.Table.ActionsColumnRenders the header over the row actions with its name visually hidden, since the buttons beneath name themselves.Table.ActionsRenders a row's actions on one line.Table.ActionRenders one row action as a small neutral ghost button, or a danger one withdanger; inside the overflow menu of Table.Actions it renders as a menu row instead, so an app writes each action once and both forms carry it.Table.RowLinkRenders the link to a row's record, usually the name in the first cell; its hit area covers the whole row, and its focus ring outlines the row.Table.NumberCellRenders a number throughIntl.NumberFormat, end-aligned in tabular figures.Table.CurrencyCellRenders an amount in its currency's symbol with the ISO code muted after it ("€123.00 EUR"), end-aligned in tabular figures so amounts in mixed currencies still line up.Table.IdCellRenders an id in mono, ellipsised in the middle so its last characters stay visible.Table.DateCellRenders a moment throughRelativeTime: "2m ago" within a week, a date after it, the exact local and UTC time in its title.Table.StatusCellRenders a state as aStatusDotand its label, with any Table.StatusDetail after the name, the whole label on one line.Table.StatusDetailDetail after a status's name, muted past a middle dot on the same line, such as a date or a code.Table.BarCellRenders a figure over a bar sized tovalue / max, so the column reads as a bar chart while every figure stays exact.Table.EmptyRenders what a table with no rows shows: any content, laid out beneath the table's header and outside the<table>, so the column names stay as context for what is missing.Table.ErrorRenders a failure in place of Table.Body: the message and a Retry control centred across every column, announced as an alert, so the header and the page around it stay put.Table.ErrorMessageWhat went wrong, set beside the Retry control in a failed table's alert.Table.LoadMoreRenders a trailing row carrying a single link that spans every column, standing in for an auto-loading "next page" trigger since fetching more rows without a full navigation requires script a consumer attaches.Table.LoadMoreLinkThe trailing row's link to the next page, centred and muted until hovered.
Examples
Selection with select-all and shift-click ranges
| Title | Author | Words | |
|---|---|---|---|
| Shipping status pages in an afternoon | Ana Ruiz | 1,840 | |
| What we learned from a week of 5xx alerts | Kenji Mori | 2,310 | |
| Release notes: October | Ana Ruiz | 960 | |
| Choosing a check interval | Lena Vogt | 1,275 | |
| Incident review: DNS at the edge | Kenji Mori | 3,105 |
View code
<form id="bulk-posts" method="post" action="/posts/bulk" />
<Table.Container>
<Table aria-label="Drafts">
<Table.Header>
<Table.Row>
<Table.SelectAll label="Select all drafts" />
<Table.Column>Title</Table.Column>
<Table.Column>Author</Table.Column>
<Table.Column numeric>Words</Table.Column>
</Table.Row>
</Table.Header>
<Table.Body>
{posts.map((post) => (
<Table.Row key={post.id}>
<Table.Select
name="post"
value={post.id}
form="bulk-posts"
checked={post.selected}
label={`Select ${post.title}`}
/>
<Table.Cell>
<Table.RowLink href={`/posts/${post.id}/edit`}>{post.title}</Table.RowLink>
</Table.Cell>
<Table.Cell>{post.author}</Table.Cell>
<Table.NumberCell value={post.words} locale="en" />
</Table.Row>
))}
</Table.Body>
</Table>
</Table.Container>Typed cells: a payments list
| Payment | Customer | Amount | Fee | Status | Created |
|---|---|---|---|---|---|
| pi_3QbX9f2eZvKYlo2C1x8T4aRw | Northwind Traders | $1,280.00USD | $37.42USD | Succeeded | |
| pi_3QbWzA2eZvKYlo2C0m1Pq7Ld | Acme Design GmbH | €480.00EUR | — | Pending | |
| pi_3QbR1c2eZvKYlo2C1s9Hk2Mn | Globex | $39,000.75USD | $1,131.32USD | Succeeded | |
| pi_3QaZ0d2eZvKYlo2C0v4Bf8Xy | Initech Ltd | £96.00GBP | £2.98GBP | Refunded | |
| pi_3QYm7e2eZvKYlo2C1c3Dg5Jz | Hooli | $740.00USD | — | Failed |
View code
<Table.Container>
<Table aria-label="Payments">
<Table.Header>
<Table.Row>
<Table.Column>Payment</Table.Column>
<Table.Column>Customer</Table.Column>
<Table.Column numeric>Amount</Table.Column>
<Table.Column numeric>Fee</Table.Column>
<Table.Column>Status</Table.Column>
<Table.Column>Created</Table.Column>
</Table.Row>
</Table.Header>
<Table.Body>
{payments.map((payment) => (
<Table.Row key={payment.id}>
<Table.IdCell value={payment.id} />
<Table.Cell>{payment.customer}</Table.Cell>
<Table.CurrencyCell value={payment.amount} currency={payment.currency} locale="en" />
<Table.CurrencyCell value={payment.fee} currency={payment.currency} locale="en" />
<Table.StatusCell color={payment.status.color}>{payment.status.label}</Table.StatusCell>
<Table.DateCell date={payment.createdAt} now={requestTime} locale="en" />
</Table.Row>
))}
</Table.Body>
</Table>
</Table.Container>Compact and comfortable rows
| Customer | Subject | Status | Updated |
|---|---|---|---|
| Maya Chen | Webhook retries stopped after the plan change | Open | |
| Tomás Herrera | Invoice shows the old company address | Waiting | |
| Priya Natarajan | Can we export check history as CSV? | Solved |
| Customer | Status | Updated |
|---|---|---|
| Maya Chen Webhook retries stopped after the plan change | Open | |
| Tomás Herrera Invoice shows the old company address | Waiting | |
| Priya Natarajan Can we export check history as CSV? | Solved |
View code
<Table aria-label="Inbox, compact" density="compact">…</Table>
<Table aria-label="Inbox, comfortable" density="comfortable">
…
<Table.Cell>
<Table.RowLink href={`/inbox/${conversation.id}`}>{conversation.customer}</Table.RowLink>
<div>{conversation.subject}</div>
</Table.Cell>
…
</Table>Empty, failed and refetching
| Name | Owner | Subscribers |
|---|
No status pages yet
Publish one to tell customers what is up before they ask.
| Name | Owner | Subscribers |
|---|---|---|
Incidents could not load. Request 7f3a2c91.Retry | ||
| Name | Owner | Subscribers |
|---|---|---|
| status.acme.dev | Platform | 4,210 |
| pay.acme.dev | Payments | 1,388 |
View code
<Table.Container>
<Table aria-label="Status pages">
<Table.Header>…</Table.Header>
</Table>
<Table.Empty>
<p>No status pages yet</p>
<p>Publish one to tell customers what is up before they ask.</p>
</Table.Empty>
</Table.Container>
<Table aria-label="Incidents">
<Table.Header>…</Table.Header>
<Table.Error colSpan={3}>
<Table.ErrorMessage>Incidents could not load. Request 7f3a2c91.</Table.ErrorMessage>
<LinkButton href={currentUrl} size="sm" variant="outline">Retry</LinkButton>
</Table.Error>
</Table>
<Table aria-label="Deploys" aria-busy={refreshing ? "true" : undefined}>…</Table>Pinned first column and data bars
| Route | Requests | Errors | P75 | P99 | Transferred |
|---|---|---|---|---|---|
| /api/checks | 1.3M | 0.12% | 48 ms | 212 ms | 9.4 GB |
| /api/monitors/:id | 642K | 0.04% | 31 ms | 140 ms | 2.1 GB |
| /status/:slug | 402K | 0% | 22 ms | 96 ms | 6.8 GB |
| /api/incidents | 88K | 3.1% | 120 ms | 940 ms | 0.32 GB |
| /webhooks/stripe | 12K | 0.81% | 210 ms | 1,480 ms | 0.04 GB |
View code
<Table.Container>
<Table aria-label="Routes, last 24 hours" pinFirstColumn>
<Table.Header>
<Table.Row>
<Table.Column>Route</Table.Column>
<Table.Column numeric>Requests</Table.Column>
<Table.Column numeric>Errors</Table.Column>
<Table.Column numeric>P75</Table.Column>
<Table.Column numeric>P99</Table.Column>
<Table.Column numeric>Transferred</Table.Column>
</Table.Row>
</Table.Header>
<Table.Body>
{routes.map((route) => (
<Table.Row key={route.path}>
<Table.Cell>{route.path}</Table.Cell>
<Table.BarCell value={route.requests} max={busiest} locale="en" format={{ notation: "compact" }} />
<Table.NumberCell value={route.errorRate} locale="en" format={{ style: "percent", maximumFractionDigits: 2 }} />
<Table.NumberCell value={route.p75Ms} locale="en" format={{ style: "unit", unit: "millisecond" }} />
<Table.NumberCell value={route.p99Ms} locale="en" format={{ style: "unit", unit: "millisecond" }} />
<Table.NumberCell value={route.gigabytes} locale="en" format={{ style: "unit", unit: "gigabyte", maximumFractionDigits: 2 }} />
</Table.Row>
))}
</Table.Body>
</Table>
</Table.Container>Sorting through URLs
| Invoice | Customer | Issued | Status | Total | |
|---|---|---|---|---|---|
| INV-2041 | Northwind Traders | 12 Sep | paid | $1,280.00 | |
| INV-2040 | Acme Design | 11 Sep | open | $480.00 | |
| INV-2039 | Globex | 9 Sep | overdue | $3,900.00 | |
| INV-2038 | Initech | 4 Sep | paid | $96.00 | |
| INV-2037 | Hooli | 1 Sep | paid | $740.00 | |
| Load the next 25 invoices | |||||
View code
let selection = new SelectionModel({ mode: "multiple", keys, selectedKeys: ["INV-2039"] });
selection.addEventListener("change", () => void handle.update());
// The headers link, so the order is whatever the query asks for. An app would serve
// the page back sorted; a page that is its own server writes the query and re-reads it.
let sort = readSort(globalThis.location?.search ?? "");
function sortFromHeader(event) {
let link = event.target.closest('th[aria-sort] a');
if (!link) return;
event.preventDefault();
globalThis.history.pushState(null, "", link.href);
sort = readSort(globalThis.location.search);
void handle.update();
}
// Only the active column carries a direction; the rest show the idle indicator.
let direction = (key) => (sort.key === key ? sort.direction : undefined);
<div mix={[on("click", sortFromHeader)]}>
<Table.Container>
<Table aria-label="Invoices">
<Table.Header>
<Table.Row>
<Table.Column>
<Checkbox
aria-label="Select every invoice"
checked={selection.isAll}
mix={[on<HTMLInputElement, "change">("change", toggleAll)]}
/>
</Table.Column>
<Table.Column sortDirection={direction("id") ?? "none"}>
<Table.SortLink href={sortHref("id", sort)}>Invoice</Table.SortLink>
</Table.Column>
<Table.Column sortDirection={direction("customer") ?? "none"}>
<Table.SortLink href={sortHref("customer", sort)}>Customer</Table.SortLink>
</Table.Column>
<Table.Column sortDirection={direction("issued") ?? "none"}>
<Table.SortLink href={sortHref("issued", sort)}>Issued</Table.SortLink>
</Table.Column>
<Table.Column>Status</Table.Column>
<Table.Column align="end" sortDirection={direction("total") ?? "none"}>
<Table.SortLink href={sortHref("total", sort)}>Total</Table.SortLink>
</Table.Column>
</Table.Row>
</Table.Header>
<Table.Body>
{sortInvoices(invoices, sort).map((invoice) => (
<Table.Row
key={invoice.id}
aria-selected={selection.isSelected(invoice.id) ? "true" : undefined}
>
<Table.Cell>
<Checkbox
aria-label={`Select ${invoice.id}`}
checked={selection.isSelected(invoice.id)}
mix={[
on<HTMLInputElement, "change">("change", () => selection.toggle(invoice.id)),
]}
/>
</Table.Cell>
<Table.Cell>{invoice.id}</Table.Cell>
<Table.Cell>{invoice.customer}</Table.Cell>
<Table.Cell>{invoice.issuedLabel}</Table.Cell>
<Table.Cell>
<Badge color={statusColors[invoice.status]} variant="secondary">
{invoice.status}
</Badge>
</Table.Cell>
<Table.Cell>{invoice.totalLabel}</Table.Cell>
</Table.Row>
))}
<Table.LoadMore colSpan={6}>
<Table.LoadMoreLink href="?page=2">Load the next 25 invoices</Table.LoadMoreLink>
</Table.LoadMore>
</Table.Body>
</Table>
</Table.Container>
<div mix={[hstack({ gap: 2, align: "center", justify: "end" })]}>
<Text>
{selection.size} of {invoices.length} selected
</Text>
</div>
</div>Props
Read from the component's own types, so every prop, every default and every allowed value is listed.
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
density | "compact" | "comfortable" | — | No | Row height, exposed as data-density and --ui-table-row-block-size. |
pinFirstColumn | boolean | — | No | Keeps the first column in view while the table scrolls sideways in its container, with an edge shadow that appears once anything has scrolled beneath it. |
Also accepts everything in TagProps<"table">.
Table.Container
Also accepts everything in TagProps<"div">.
Table.Header
Also accepts everything in TagProps<"thead">.
Table.Body
Also accepts everything in TagProps<"tbody">.
Table.Column
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
align | "start" | "center" | "end" | — | No | Text alignment for the header and its indicator. Defaults to DEFAULT_ALIGN, or DEFAULT_NUMERIC_ALIGN for a numeric column. |
numeric | boolean | — | No | Marks the column as holding numbers, exposed as data-numeric: the header aligns to the end unless align says otherwise, matching numeric cells beneath it. |
sortDirection | SortDirection | "none" | — | No | This column's sort direction: ascending or descending when it is the active sort key, none when it sorts but is not active. Omit it for an unsortable column. |
Also accepts everything in Omit<TagProps<"th">, "align">.
Table.SortLink
Table.Row
Also accepts everything in TagProps<"tr">.
Table.Cell
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
numeric | boolean | — | No | Marks the cell as a number, exposed as data-numeric: its figures render at tabular widths and align to the end, so digits line up down the column. |
Also accepts everything in TagProps<"td">.
Table.Keys
Table.SelectAll
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
label | string | — | Yes | Accessible name of the select-all checkbox, such as "Select all monitors". |
checked | boolean | — | No | Whether every row starts selected. |
Also accepts everything in Omit<TagProps<"th">, "children">.
Table.Select
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
value | string | — | Yes | The row's key, submitted as the checkbox's value. |
label | string | — | Yes | Accessible name, such as "Select api.example.com". |
name | string | — | No | Field name the checked keys submit under. |
form | string | — | No | Id of a <form> elsewhere on the page the checkbox submits with, such as a bulk-action form. |
checked | boolean | — | No | Whether the row starts selected. |
disabled | boolean | — | No | Keeps the row out of the selection and out of select-all. |
Also accepts everything in Omit<TagProps<"td">, "children">.
Table.ActionsColumn
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
label | string | — | Yes | The column's name for assistive technology, such as "Actions". |
Also accepts everything in Omit<TagProps<"th">, "children">.
Table.Actions
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
overflowLabel | string | — | No | Name of the menu button that stands in for the actions in a narrow table, such as "More actions", which then lists Table.Action children as menu rows. Without it, the button takes Table.ActionsColumn's label and opens the actions as they are. |
Also accepts everything in TagProps<"td">.
Table.Action
Also accepts everything in Menu.ItemProps.
Table.RowLink
Table.NumberCell
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
value | number | null | undefined | — | Yes | The value; null or undefined renders —. |
locale | string | — | No | BCP 47 locale. Defaults to the runtime's. |
format | Intl.NumberFormatOptions | — | No | Formatting, such as { style: "unit", unit: "millisecond" } or { style: "percent" }. |
Also accepts everything in TypedCellProps.
Table.CurrencyCell
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
value | number | null | undefined | — | Yes | The amount in major units (12.8 for $12.80); null or undefined renders —. |
currency | string | — | Yes | ISO 4217 code, such as "USD". |
locale | string | — | No | BCP 47 locale. Defaults to the runtime's. |
Also accepts everything in TypedCellProps.
Table.IdCell
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
value | string | null | undefined | — | Yes | The full id, kept whole in the text and the title; null or undefined renders —. |
tail | number | — | No | Characters kept after the ellipsis, always whole: the cell outgrows --ui-table-id-max-inline-size as far as they need. Defaults to DEFAULT_ID_TAIL. |
Also accepts everything in TypedCellProps.
Table.DateCell
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
date | Date | string | number | null | undefined | — | Yes | The moment; null or undefined renders —. |
now | Date | string | number | — | No | Reference moment, so the server renders deterministically. |
locale | string | — | No | BCP 47 locale. |
timeZone | string | — | No | IANA zone the server formats in. Defaults to UTC. |
local | boolean | — | No | Rewrites the time in the viewer's zone through the RelativeTimeLocal island. |
Also accepts everything in TypedCellProps.
Table.StatusCell
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
color | "brand" | "neutral" | "success" | "warning" | "danger" | — | No | Semantic role of the state. |
pulse | boolean | — | No | Marks a state still in progress, so its dot pulses. |
children | RemixNode | — | No | The state's name, then any Table.StatusDetail; omit it and the cell renders —. |
Also accepts everything in Omit<TagProps<"td">, "color">.
Table.StatusDetail
Also accepts everything in TagProps<"span">.
Table.BarCell
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
value | number | null | undefined | — | Yes | The value; null or undefined renders —. |
max | number | — | No | The value a full bar stands for. Defaults to DEFAULT_BAR_MAX. |
locale | string | — | No | BCP 47 locale for the figure. |
format | Intl.NumberFormatOptions | — | No | Formatting for the figure. |
color | "brand" | "neutral" | "success" | "warning" | "danger" | — | No | The bar's role colour. Defaults to neutral. |
Also accepts everything in TypedCellProps.
Table.Empty
Also accepts everything in TagProps<"div">.
Table.Error
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
colSpan | number | — | Yes | Number of columns the table renders, so the message spans the full row width. |
children | RemixNode | — | Yes | What went wrong, as a Table.ErrorMessage, then a Retry control. |
Also accepts everything in TagProps<"tbody">.
Table.ErrorMessage
Also accepts everything in TagProps<"span">.
Table.LoadMore
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
colSpan | number | — | Yes | Number of columns the surrounding table renders, so the link spans the full row width. |
children | RemixNode | — | Yes | A Table.LoadMoreLink. |
Also accepts everything in TagProps<"tr">.
Table.LoadMoreLink
Types
| Name | Values | What it decides |
|---|---|---|
Align | "start" | "center" | "end" | Text alignment for a column's header and, by convention, its cells. |
SortDirection | "ascending" | "descending" | Current sort direction for a sortable column, matching the values the native aria-sort attribute accepts. |
Density | "compact" | "comfortable" | Row height: compact is 2.5rem for scanning, comfortable 3.5rem for two-line rows. |