Table
When to use it
Section titled “When to use it”- To list records people scan, compare and act on in the back office, such as rate seasons, admins, invites or documents.
- Put the name of each record in the first column (primary), the status in a tag, and row actions such as “Edit” or “Resend · Revoke” in the last column.
- Turn on the checkbox column when people act on several rows at once, and show the selected rows in light blue.
Where it goes
Section titled “Where it goes”- Under header type=backoffice, to the right of the SideBar (the BackOfficePage story).
When not to use it
Section titled “When not to use it”- On the guest website or app for browsing stays: use Card type listing.
Instead: Card - For two or three facts about one thing, such as in a dialog: use detail rows.
The Figma page names no alternative. - Put long text or paragraphs in a cell: link to a detail page instead.
The Figma page names no alternative.
Open item: no alternative named for items 2 and 3. Those items have an empty instead in Table.intent.json. The Figma page names no Horizon component for them: “use detail rows” and “link to a detail page instead” are not components of this system. This page shows “The Figma page names no alternative” and does not fill the gap. The release review also records that some accessibility facts bundle a second claim at another line; each is true and implemented.
From the release review, under “Warnings”, as written:
Intent file. Two dont_use_when entries with no alternative (C2); C3 line citations as noted. Owner: component-intent. Not edited.
Added by the engineer, not in Figma
Section titled “Added by the engineer, not in Figma”Figma draws none of these, and Table.tsx and Table.css at b9ffb76 build them anyway. The designer still has to confirm them.
- the descending sort arrow:
TableSortDirectionhas"ascending" \| "descending"(Table.tsx:14) and the arrow turns for ascending (Table.tsx:200,Table.css:107-109) - the keyboard focus ring on the checkboxes, the sort button and the action links (
Table.css:188-193) - disabled Previous and Next: the
previousDisabledandnextDisabledprops and the:disabledrule (Table.css:182-186)
From the release review, under “Warnings”, as written:
Added by the engineer, not in Figma: descending sort arrow, keyboard focus ring, disabled Previous / Next (transparent background although –color-state-disabled-bg exists). Named in “Not ruled”. The designer still has to confirm them.
Best practice
Section titled “Best practice”From the Figma documentation page (usage node 251:353), as written. These items aren’t carried into Table.intent.json, which has no field for them.
- Keep column headers short and sentence case, and let people sort by the most useful column, usually the first.
- Use tag tones the same way everywhere: success for live or on file, error for expired or missing, neutral for past or draft.
- Show how many records there are in the footer, such as “Showing 1 to 5 of 7 seasons”, and keep Previous and Next in the same place.
What each variant is for
Section titled “What each variant is for”| Property | Value | What it is for |
|---|---|---|
tone |
success |
Live, On file (the success tag tone). |
tone |
neutral |
Past, Draft (the neutral tag tone). |
tone |
error |
Expired, Missing (the error tag tone). |
tone |
warning |
Expiring soon (the warning tag tone). |
tone |
info |
Upcoming (the info tag tone). |
Four of the five tones have no pixel spec in Figma. The table in Figma draws only the success tag. The tag set (248:18) holds all five tones as 38x22 swatches. neutral, error, warning and info have no further colour or pixel specification in the Figma Table frame; QA passed them on geometry and token consistency.
From the release review, under “Warnings”, as written:
Neutral, error, warning and info tag colours have no pixel spec in the Figma Table frame; QA passed them on geometry and token consistency.
Accessibility
Section titled “Accessibility”- A native <table> with an accessible name from tableLabel (default “Data table”), so a screen reader announces rows and columns.
src/components/Table/Table.tsx:253 - Column headers are <th scope=“col”> and the primary cell of each row is <th scope=“row”>, so each cell is read with its column and row name.
src/components/Table/Table.tsx:277 - A sortable header is a native <button> and its <th> carries aria-sort (none, ascending or descending); the arrow is hidden from assistive technology.
src/components/Table/Table.tsx:279 - The row and header checkboxes are Horizon’s Checkbox, a native input, labelled “Select <row name>” and “Select all rows”; selection is the checked state, not colour alone.
src/components/Table/Table.tsx:266 - Action cells are Horizon’s Link, a native <a href>, and Previous / Next are Horizon’s Button, native <button> elements that take the disabled attribute.
src/components/Table/Table.tsx:353 - The footer summary is an aria-live=“polite” region and Previous / Next sit in a <nav> named “Pagination”.
src/components/Table/Table.tsx:350 - A keyboard focus ring (color/border/focus, 2px) is drawn on the checkboxes, the sort button and the action links.
src/components/Table/Table.css:189
Open items
Section titled “Open items”They are open items, not waived.
Open accessibility problem: the warning tag’s text contrast is about 2:1. The warning tone sets --color-status-warning text on --color-status-warning-bg (Table.css:138-141), 11px text. In the token build at b9ffb76 that is #f2a927 on #fff9e8, which is 1.91:1 by the WCAG formula, below the 4.5:1 minimum of WCAG 2.1 success criterion 1.4.3 for text this size. In the dark token values it is #f8be4c on #654208, 5.33:1. The ruling’s “Not ruled” line names it, so it is not waived. Figma’s Table frame draws no warning tag, so there is no design to compare it with. It is owned by the designer or the token owner, and changing the colour would touch other components.
From the release review, under “Warnings”, as written:
Warning tag contrast about 2:1. –color-status-warning text on –color-status-warning-bg (Table.css:138-141) is about 2:1 for 11px text, below WCAG AA. Named in the ruling’s “Not ruled”, so not waived. Figma’s Table frame draws no warning or info tag. Owner: the designer or token owner. Changing the colour would touch other components.
Not in Figma: the keyboard focus ring. The ring (Table.css:188-193: a 2px --color-border-focus outline at a 2px offset) was added by the engineer. The last fact above says it exists. Its contrast was not measured by the review, and the designer has not confirmed it.
Dark theme: not verified. Tokens do not switch under prefers-color-scheme: dark, so the dark values on the Code tab are what the token build declares, and the review did not verify them on a rendered table. The review calls this library-wide, not a Table finding.
From the release review, under “Warnings”, as written:
Dark theme unverified. Tokens do not switch under prefers-color-scheme: dark (QA note 5). Library-wide, not a Table finding.
Not tested. Real Tab order, the focus ring on screen, real hover, screen-reader output and the dark theme were not exercised. The facts above cite the code that should produce them; they are not evidence of the behaviour.
From the release review, under “Not checked”, as written:
No browser or real input: G1 is evidenced by HTTP 200, not my own render. Tab order, the focus ring on screen, real hover, screen-reader output and dark theme were not exercised here. QA’s “Still not tested” stands: BackOfficePage layout beside SideBar / Header, narrow viewport, focus ring on Previous / Next, the pagination group’s alignment and 8px gap.
Composition
Section titled “Composition”The stories compose Table with: SideBar, Header.
From the code. Table.tsx is built from Checkbox (Table.tsx:5, Table.tsx:264), Link (Table.tsx:6, Table.tsx:181), Button (Table.tsx:4, Table.tsx:354), and the registry’s Composes column records all three: Checkbox for the row and header checkboxes, Link for the action cells, Button for Previous and Next. pairs_with lists SideBar, Header, which is a pairing and not a part: the BackOfficePage story places <SideBar /> on the left and <Header type="backoffice"> above the table (Table.stories.tsx:146).
What this version promises
Section titled “What this version promises”From Versioning (VERSIONING.md at b9ffb76):
0.3.0 adds six components on top of 0.2.1: Calendar, Card, Form, Modal, SideBar and Table. It contains twenty-three components, each exported from the package root with its props type: Avatar, Breadcrumbs, Button, ButtonGroup, Calendar, Card, Checkbox, Chip, Dropdown, File, Form, Header, Image, Link, Logo, Modal, ProgressBar, RadioCard, SearchBar, SideBar, Stepper, Table, Toggle. Textfield is exported from the package root as well, with TextfieldProps and TextfieldState, and is public like the others (see decisions.md, 2026-10-07, Textfield). It commits you to their props, prop values and defaults, their hz- class names, the tokens in tokens.css and the three entry points (., ./styles.css, ./tokens.css). Everything in 0.3.0 beyond 0.2.1 is an addition: nothing from 0.2.1 was changed, removed or renamed. A change that breaks any of these on 0.x bumps the version to 0.4.0.
Two things about this release are worth knowing:
- Form, Modal and Table each passed release review with their literal sizes covered by a ruling in decisions.md (Card, SideBar and Calendar have their own), because no size tokens exist for them. Those literals are accepted until the designer adds matching tokens, so a later change to use tokens at the same rendered sizes would be a patch, not a breaking change.
- Dark theme is not verified for Table, and its warning tag has low contrast. The Table docs page says so. Neither is a breaking-change risk, but a fix that changes a token’s value is a patch and is listed in the changelog.
Stories
Section titled “Stories”Default
Section titled “Default”Without Footer
Section titled “Without Footer”Without Checkbox Column
Section titled “Without Checkbox Column”Hover And Selected
Section titled “Hover And Selected”Tag Tones
Section titled “Tag Tones”Sorted Ascending
Section titled “Sorted Ascending”Long Text
Section titled “Long Text”Previous Disabled
Section titled “Previous Disabled”Next Disabled
Section titled “Next Disabled”Interactive
Section titled “Interactive”Back Office Page
Section titled “Back Office Page”Import
Section titled “Import”import { Table } from "@layerbasesystemic/horizon-design-system";import type { TableProps, TableColumn, TableRowData, TableCellType, TableCellValue, TableTag, TableAction, TableTone, TableRowState, TableSort, TableSortDirection } from "@layerbasesystemic/horizon-design-system";@layerbasesystemic/horizon-design-system/tokens.css and @layerbasesystemic/horizon-design-system/styles.css must be loaded too; see Developing.
Table.tsx is built from Checkbox: it imports it (Table.tsx:5) and renders <Checkbox> (Table.tsx:264). The registry’s Composes column for Table lists Checkbox.
Table.tsx is built from Link: it imports it (Table.tsx:6) and renders <Link> (Table.tsx:181). The registry’s Composes column for Table lists Link.
Table.tsx is built from Button: it imports it (Table.tsx:4) and renders <Button> (Table.tsx:354). The registry’s Composes column for Table lists Button.
| Prop | Type | Default | Description |
|---|---|---|---|
columns |
TableColumn[] |
DEFAULT_COLUMNS |
Figma draws 6 columns: primary, three text, tag, action. Defaults to those. |
rows |
TableRowData[] |
DEFAULT_ROWS |
Figma draws 5 rows plus the header. Defaults to the 5 drawn. |
selectable |
boolean |
true |
Figma draws the checkbox column (default true). Turn off when people never act on several rows at once. |
showFooter |
boolean |
true |
Figma ShowFooter (default true). |
summary |
string |
"Showing 1 to 5 of 7 seasons" |
Figma footer Summary (default “Showing 1 to 5 of 7 seasons”). |
sort |
TableSort |
— | Not a Figma property. Which column is sorted, drawn as aria-sort on its header. |
onSortChange |
(sort: TableSort) => void |
— | — |
onSelectionChange |
(selectedIds: string[]) => void |
— | Called with the ids of every selected row after a checkbox changes. |
onPrevious |
() => void |
— | — |
onNext |
() => void |
— | — |
previousDisabled |
boolean |
false |
Not a Figma state. Disables the Previous button (first page). |
nextDisabled |
boolean |
false |
Not a Figma state. Disables the Next button (last page). |
tableLabel |
string |
"Data table" |
Not a Figma property. Accessible name of the table. |
TableProps also extends Omit<HTMLAttributes<HTMLDivElement>, "children">, so native attributes pass through to the element (Table.tsx:57).
Union types
Section titled “Union types”TableTone: success, neutral, error, warning, info
TableCellType: primary, text, tag, action
TableRowState: default, hover
TableSortDirection: ascending, descending
Tokens it needs
Section titled “Tokens it needs”Every CSS custom property Table.css reads, with its value in the token build at b9ffb76.
| Token | Light | Dark |
|---|---|---|
--border-width-md |
2px |
same as light |
--border-width-sm |
1px |
same as light |
--color-bg-elevated |
#f9fafb |
#4d5361 |
--color-bg-surface |
#f2f3f5 |
#272a37 |
--color-border-focus |
#1d44ba |
#6692f8 |
--color-border-subtle |
#eef1f5 |
#272a37 |
--color-primary-default |
#2b5ad6 |
#6692f8 |
--color-primary-light |
#eff3ff |
#162d69 |
--color-state-disabled-bg |
#e5e7ed |
#4d5361 |
--color-status-error |
#d02727 |
#f36969 |
--color-status-error-bg |
#fff1f1 |
#650b0b |
--color-status-success |
#229c4a |
#4dba6d |
--color-status-success-bg |
#e8faee |
#0b4721 |
--color-status-warning |
#f2a927 |
#f8be4c |
--color-status-warning-bg |
#fff9e8 |
#654208 |
--color-text-disabled |
#d1d5db |
#6a7180 |
--color-text-primary |
#161925 |
#f9fafb |
--color-text-secondary |
#4d5361 |
#9ca2b1 |
--fontfamily-body |
Inter |
same as light |
--fontsize-md |
12px |
same as light |
--fontsize-sm |
11px |
same as light |
--lineheight-md |
18px |
same as light |
--lineheight-sm |
16px |
same as light |
--radius-xs |
2px |
same as light |
--spacing-lg |
16px |
same as light |
--spacing-md |
12px |
same as light |
--spacing-sm |
8px |
same as light |
--spacing-xs |
4px |
same as light |
This matches required_tokens in Table.intent.json exactly.
Figma node
Section titled “Figma node”Page Table (57:1652), documentation frame ❖ table (251:168), component table (250:92). The file is shared with the team only, so the frame and the link ask anyone outside it to sign in.
The page also holds _table-row (250:91), which Figma describes as: “Internal part of table (not for direct use). One row of 7 cells: header (grey, column names, sort arrow on the first), default, hover (grey) or selected (light blue, checkbox ticked).” Its Figma variants: state=header (250:5), state=default (250:34), state=hover (250:52), state=selected (250:70). It also holds _table-cell (248:36), which Figma describes as: “Internal part of table (not for direct use). One cell: header (11px, optional sort arrow), primary (first column, dark Medium), text, tag, action (blue text) or checkbox. Resize the width to set the column.” Its Figma variants: type=header (248:19), type=primary (248:23), type=text (248:25), type=tag (248:27), type=action (248:30), type=checkbox (248:32).
Variant matrix
Section titled “Variant matrix”tone (5) = 5 cells. The matrix is the tag part (set 248:18): tone success (248:8), neutral (248:10), error (248:12), warning (248:14) and info (248:16), each 38x22. The table itself (component 250:92, 1172x344) is not a variant set: its boolean property is ShowFooter (true or false) and the specimen with a hovered and a selected row is 251:171. Two internal parts carry states the stories reach through data, not through a single story argument: _table-row (set 250:91: header 250:5, default 250:34, hover 250:52, selected 250:70) and _table-cell (set 248:36: header, primary, text, tag, action and checkbox). The canvas draws only the success tone in the table itself; the other four tones appear only in the tag set, as 38x22 swatches. Figma draws no sorted-descending, focus, disabled Previous / Next, empty or loading state. In the stories the tone is not a single story argument: it is set on each row’s status cell. TagTones draws all five tones, one per row, so a row below that reads ‘no story’ means no story sets a tone arg, not that the tone has no story.
tone |
Figma node | Story |
|---|---|---|
success |
248:8 |
no story |
neutral |
248:10 |
no story |
error |
248:12 |
no story |
warning |
248:14 |
no story |
info |
248:16 |
no story |
Themes
Section titled “Themes”The table documentation frame renders every instance in one theme. It has no separate light and dark frames.
The token build defines 179 tokens for light and redeclares 50 for dark; the Code tab shows Table’s tokens in both.
Values Figma never bound
Section titled “Values Figma never bound”Values on the Figma node that aren’t bound to a variable, and what Table.css at b9ffb76 does with each.
| Layer | Property | Figma value | In the code |
|---|---|---|---|
| _table-cell, body types (primary, text, tag, action, checkbox) | height | 48px |
height: 48px; |
| _table-cell type=header (248:19) | height | 44px |
height: 44px; |
| Sort icon (248:21) | width and height | 10px |
width: 10px; |
| Tag (248:8 and the four other tones) | padding, top and bottom | 3px |
padding: 3px var(--spacing-sm); |
| Previous and Next (250:214, 250:222) | width | 80px |
width: 80px; |
| Column widths: checkbox, primary, text, tag, action | width | 48, 268, 180, 140, 176px |
Set in code as DEFAULT_WIDTH and CHECKBOX_WIDTH: src/components/Table/Table.tsx |
Figma variables against the token build
Section titled “Figma variables against the token build”| Figma variable | Figma value | Token in the build | Built light value | Agrees |
|---|---|---|---|---|
--radius-xs |
2 |
--radius-xs |
2px |
yes |
--border-width-sm |
1 |
--border-width-sm |
1px |
yes |
--color-bg-elevated |
#f9fafb |
--color-bg-elevated |
#f9fafb |
yes |
--color-border-strong |
#c8d2dd |
--color-border-strong |
#c8d2dd |
yes |
--spacing-xs |
4 |
--spacing-xs |
4px |
yes |
--spacing-lg |
16 |
--spacing-lg |
16px |
yes |
--color-text-secondary |
#4d5361 |
--color-text-secondary |
#4d5361 |
yes |
--fontSize-sm |
11 |
--fontsize-sm |
11px |
yes |
--fontWeight-medium |
Medium |
no such token | — | no token |
--fontFamily-body |
Inter |
--fontfamily-body |
Inter |
yes |
--lineHeight-sm |
16 |
--lineheight-sm |
16px |
yes |
--color-bg-surface |
#f2f3f5 |
--color-bg-surface |
#f2f3f5 |
yes |
--color-border-subtle |
#eef1f5 |
--color-border-subtle |
#eef1f5 |
yes |
--color-text-primary |
#161925 |
--color-text-primary |
#161925 |
yes |
--fontSize-md |
12 |
--fontsize-md |
12px |
yes |
--lineHeight-md |
18 |
--lineheight-md |
18px |
yes |
--fontWeight-regular |
Regular |
no such token | — | no token |
--color-status-success |
#229c4a |
--color-status-success |
#229c4a |
yes |
--color-status-success-bg |
#e8faee |
--color-status-success-bg |
#e8faee |
yes |
--color-text-link |
#1d44ba |
--color-text-link |
#1d44ba |
yes |
--color-primary-default |
#3b71f2 |
--color-primary-default |
#2b5ad6 |
no |
--color-primary-light |
#eff3ff |
--color-primary-light |
#eff3ff |
yes |
--fontSize-xs |
10 |
--fontsize-xs |
10px |
yes |
--lineHeight-xs |
16 |
--lineheight-xs |
16px |
yes |
--radius-sm |
6 |
--radius-sm |
6px |
yes |
--color-neutral-default |
#8a909c |
--color-neutral-default |
#8a909c |
yes |
--spacing-sm |
8 |
--spacing-sm |
8px |
yes |
--color-text-inverse |
#f9fafb |
--color-text-inverse |
#f9fafb |
yes |
--color-status-error |
#ea3d3d |
--color-status-error |
#d02727 |
no |
--color-status-error-bg |
#fff1f1 |
--color-status-error-bg |
#fff1f1 |
yes |
--color-status-warning |
#f2a927 |
--color-status-warning |
#f2a927 |
yes |
--color-status-warning-bg |
#fffefa |
--color-status-warning-bg |
#fff9e8 |
no |
--fontWeight-medium, --fontWeight-regular are bound in Figma but the token build has no token of that name.
3 colour variables in Figma still hold a different value from the token build, so the design file and the shipped component render --color-primary-default, --color-status-error, --color-status-warning-bg differently.
Design gaps recorded against it
Section titled “Design gaps recorded against it”Warning tag colours: low contrast, and no Figma node for them. Figma’s Table frame draws no warning or info tag, so the warning pair --color-status-warning on --color-status-warning-bg (Table.css:138-141) has nothing to be checked against. The contrast problem is described on the Usage tab under Accessibility.
From the release review, under “Warnings”, as written:
Warning tag contrast about 2:1. –color-status-warning text on –color-status-warning-bg (Table.css:138-141) is about 2:1 for 11px text, below WCAG AA. Named in the ruling’s “Not ruled”, so not waived. Figma’s Table frame draws no warning or info tag. Owner: the designer or token owner. Changing the colour would touch other components.
Not in Figma, added by the engineer. The descending sort arrow, the keyboard focus ring and the disabled Previous / Next are listed on the Usage tab. The designer still has to confirm them. The disabled rule (Table.css:182-186) sets a border colour, a text colour and a cursor and no background; --color-state-disabled-bg is used for the border colour only.
Tag tones with no pixel spec. Only success is drawn in the table. From the release review, under “Warnings”, as written:
Neutral, error, warning and info tag colours have no pixel spec in the Figma Table frame; QA passed them on geometry and token consistency.
Dark theme. From the release review, under “Warnings”, as written:
Dark theme unverified. Tokens do not switch under prefers-color-scheme: dark (QA note 5). Library-wide, not a Table finding.
No story for the descending sort. Table.stories.tsx has SortedAscending and no story that sets direction: "descending"; in Storybook the descending state is reached only by clicking the sort header in Interactive.
From the release review, under “Warnings”, as written:
No story for descending sort; reachable through Interactive. Owner: engineer, if wanted.
- 2026-10-07 · Table sizes with no token (decisions.md). These literals are accepted, because they are what the Figma nodes specify (or, for the focus ring, the established offset), until the designer adds matching size tokens. Accepted values:
48px(body row height, lineTable.css);44px(header row height, lineTable.css);10px(sort icon width, lineTable.css);10px(sort icon height, lineTable.css);3px(tag block padding, lineTable.css);80px(Previous / Next button width, lineTable.css);2px(focus ring outline-offset, lineTable.css);48(checkbox column width, lineTable.tsx);268(primary column width, lineTable.tsx);180(text column width, lineTable.tsx);140(tag column width, lineTable.tsx);176(action column width, lineTable.tsx). Not ruled: Any other literal value, including a var() fallback. These values in any other component. A change to these values: a different number needs a new ruling or a token. The warning tag’s roughly 2:1 contrast, and the descending sort arrow, focus ring and disabled Previous / Next that Figma does not draw, which the designer still has to confirm.
Every commit to src/components/Table up to b9ffb76, newest first, with the published version that carries it.
| Commit | Date | Version | Change |
|---|---|---|---|
e13f7ae |
2026-10-07 | 0.3.0 | Table: build from Figma 57:1652 (columns, rows, selection, sort, footer) |