Skip to main content

V1Table

Used to create a static table of data to easily convey information.

github
View source code
V1 components are not compatible with the flattenTokens hook or the DefaultPropsProvider, nor can they be themed using component-level design tokens.
A future redesign will deliver V2 versions of these components and make them compatible with these features.
import { V1Table } from '@uhg-abyss/web/ui/Table';

Usage​

A table is used strictly for HTML markup on the page. It is a static tabular structure containing one or more rows that each contain one or more cells; it is not an interactive widget. Thus, its cells are not focusable or selectable. It organizes information in a way that's easy to scan so that users can look for patterns and develop insights from data.

The table consists of two main parts: a header and a body. Column header names describe the type of content displayed in each column. The column header text uses a medium weight font to differentiate from row text. Each row contains data related to a single entity.

If you want to turn a column or FooterCell into a row header, pass the isRowHeader: true prop to an individual column or cell.

Table overflow scroll​

The contents of a table can be made scrollable if there is not enough space to show the entire table at once. To do so, use a wrapper element like in the example below, setting the CSS overflow property to 'auto' and adding a tabindex of 0.

Manual table​

If more customization is needed, use the Table sub-components to create each section. This allows for adjustments to the individual sections.

Custom table​

If further customization is needed, most styles of Table can be overridden using css.

V1Table Props​

Name
Type
DefaultRequiredA11yDescription
children
string | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | null | undefined
The contents of the table component
className
string | undefined
CSS class name to apply to each element within the component
columns
TableColumn[]
Table column configuration
css
CSSProperties | Partial<Record<"abyss-table-root" | "abyss-table-head" | "abyss-table-header" | "abyss-table-styled-header" | "abyss-table-header-container" | "abyss-table-header-cell-container" | ... 9 more ... | `abyss-table-footer-cell-col-${number}`, CSSProperties>> | undefined
Object containing CSS styling to apply; uses the classes listed in the "Integration" tab of the component's documentation
See CSS Prop Styling for more information
data-testid
string | undefined
Suffix used to create a unique ID used for automated testing
See Component Testing for more information
footer
ReactNode | object[]
Table footer component
hiddenFrom
Breakpoint | undefined
When defined, the component is hidden once the screen width reaches the specified breakpoint.
highlightRowOnHover
boolean | undefined
false
If true, hovering over a row will highlight it
rows
TableRow[]
Table row configuration
slotProps
Partial<Record<string, SlotPropsValue<string>>> | undefined
Props to pass to individual internal slots of the component, keyed by the slot name
(e.g. 'button-root'). Supports className, css, style, aria-*, data-*,
data-testid, and nested slotProps for child Abyss components.
See slotProps for more information
title
string
The accessible name for the table, announced to screen readers navigating by landmark or table structure.
visibleFrom
Breakpoint | undefined
When defined, the component is hidden until the screen width reaches the specified breakpoint.

V1Table.Container Props​

Name
Type
RequiredA11yDescription
children
string | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | null | undefined
The contents of the Table component
className
string | undefined
CSS class name to apply to each element within the component
css
CSSProperties | Partial<Record<"abyss-table-root", CSSProperties>> | undefined
Object containing CSS styling to apply; uses the classes listed in the "Integration" tab of the component's documentation
See CSS Prop Styling for more information
data-testid
string | undefined
Suffix used to create a unique ID used for automated testing
See Component Testing for more information
hiddenFrom
Breakpoint | undefined
When defined, the component is hidden once the screen width reaches the specified breakpoint.
slotProps
Partial<Record<string, SlotPropsValue<string>>> | undefined
Props to pass to individual internal slots of the component, keyed by the slot name
(e.g. 'button-root'). Supports className, css, style, aria-*, data-*,
data-testid, and nested slotProps for child Abyss components.
See slotProps for more information
title
string
The accessible name for the table, announced to screen readers navigating by landmark or table structure.
visibleFrom
Breakpoint | undefined
When defined, the component is hidden until the screen width reaches the specified breakpoint.

V1Table.TableHeader Props​

Name
Type
Description
children
string | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | null | undefined
The contents of the table header
className
string | undefined
CSS class name to apply to each element within the component
css
CSSProperties | Partial<Record<"abyss-table-head", CSSProperties>> | undefined
Object containing CSS styling to apply; uses the classes listed in the "Integration" tab of the component's documentation
See CSS Prop Styling for more information
data-testid
string | undefined
Suffix used to create a unique ID used for automated testing
See Component Testing for more information
hiddenFrom
Breakpoint | undefined
When defined, the component is hidden once the screen width reaches the specified breakpoint.
slotProps
Partial<Record<string, SlotPropsValue<string>>> | undefined
Props to pass to individual internal slots of the component, keyed by the slot name
(e.g. 'button-root'). Supports className, css, style, aria-*, data-*,
data-testid, and nested slotProps for child Abyss components.
See slotProps for more information
visibleFrom
Breakpoint | undefined
When defined, the component is hidden until the screen width reaches the specified breakpoint.

V1Table.TableHeaderRow Props​

Name
Type
Description
children
string | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | null | undefined
The contents of the header row
className
string | undefined
CSS class name to apply to each element within the component
css
CSSProperties | Partial<Record<"abyss-table-header", CSSProperties>> | undefined
Object containing CSS styling to apply; uses the classes listed in the "Integration" tab of the component's documentation
See CSS Prop Styling for more information
data-testid
string | undefined
Suffix used to create a unique ID used for automated testing
See Component Testing for more information
hiddenFrom
Breakpoint | undefined
When defined, the component is hidden once the screen width reaches the specified breakpoint.
slotProps
Partial<Record<string, SlotPropsValue<string>>> | undefined
Props to pass to individual internal slots of the component, keyed by the slot name
(e.g. 'button-root'). Supports className, css, style, aria-*, data-*,
data-testid, and nested slotProps for child Abyss components.
See slotProps for more information
visibleFrom
Breakpoint | undefined
When defined, the component is hidden until the screen width reaches the specified breakpoint.

V1Table.Column Props​

Name
Type
Description
children
string | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | null | undefined
The contents of the column header
className
string | undefined
CSS class name to apply to each element within the component
css
CSSProperties | Partial<Record<"abyss-table-styled-header" | "abyss-table-header-container" | "abyss-table-header-cell-container" | `abyss-table-styled-header-col-${number}`, CSSProperties>> | undefined
Object containing CSS styling to apply; uses the classes listed in the "Integration" tab of the component's documentation
See CSS Prop Styling for more information
data-testid
string | undefined
Suffix used to create a unique ID used for automated testing
See Component Testing for more information
hiddenFrom
Breakpoint | undefined
When defined, the component is hidden once the screen width reaches the specified breakpoint.
slotProps
Partial<Record<string, SlotPropsValue<string>>> | undefined
Props to pass to individual internal slots of the component, keyed by the slot name
(e.g. 'button-root'). Supports className, css, style, aria-*, data-*,
data-testid, and nested slotProps for child Abyss components.
See slotProps for more information
visibleFrom
Breakpoint | undefined
When defined, the component is hidden until the screen width reaches the specified breakpoint.

V1Table.TableBody Props​

Name
Type
Description
children
string | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | null | undefined
The contents of the table body
className
string | undefined
CSS class name to apply to each element within the component
css
CSSProperties | Partial<Record<"abyss-table-body", CSSProperties>> | undefined
Object containing CSS styling to apply; uses the classes listed in the "Integration" tab of the component's documentation
See CSS Prop Styling for more information
data-testid
string | undefined
Suffix used to create a unique ID used for automated testing
See Component Testing for more information
hiddenFrom
Breakpoint | undefined
When defined, the component is hidden once the screen width reaches the specified breakpoint.
slotProps
Partial<Record<string, SlotPropsValue<string>>> | undefined
Props to pass to individual internal slots of the component, keyed by the slot name
(e.g. 'button-root'). Supports className, css, style, aria-*, data-*,
data-testid, and nested slotProps for child Abyss components.
See slotProps for more information
visibleFrom
Breakpoint | undefined
When defined, the component is hidden until the screen width reaches the specified breakpoint.

V1Table.Row Props​

Name
Type
Description
children
string | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | null | undefined
The contents of the row
className
string | undefined
CSS class name to apply to each element within the component
css
CSSProperties | Partial<Record<"abyss-table-row" | `abyss-table-row-${number}`, CSSProperties>> | undefined
Object containing CSS styling to apply; uses the classes listed in the "Integration" tab of the component's documentation
See CSS Prop Styling for more information
data-testid
string | undefined
Suffix used to create a unique ID used for automated testing
See Component Testing for more information
hiddenFrom
Breakpoint | undefined
When defined, the component is hidden once the screen width reaches the specified breakpoint.
slotProps
Partial<Record<string, SlotPropsValue<string>>> | undefined
Props to pass to individual internal slots of the component, keyed by the slot name
(e.g. 'button-root'). Supports className, css, style, aria-*, data-*,
data-testid, and nested slotProps for child Abyss components.
See slotProps for more information
visibleFrom
Breakpoint | undefined
When defined, the component is hidden until the screen width reaches the specified breakpoint.

V1Table.Cell Props​

Name
Type
A11yDescription
children
string | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | null | undefined
The contents of the cell
className
string | undefined
CSS class name to apply to each element within the component
css
CSSProperties | Partial<Record<"abyss-table-cell" | `abyss-table-cell-col-${number}-row-${number}`, CSSProperties>> | undefined
Object containing CSS styling to apply; uses the classes listed in the "Integration" tab of the component's documentation
See CSS Prop Styling for more information
data-testid
string | undefined
Suffix used to create a unique ID used for automated testing
See Component Testing for more information
hiddenFrom
Breakpoint | undefined
When defined, the component is hidden once the screen width reaches the specified breakpoint.
isRowHeader
boolean | undefined
If true, renders the cell as a row header
slotProps
Partial<Record<string, SlotPropsValue<string>>> | undefined
Props to pass to individual internal slots of the component, keyed by the slot name
(e.g. 'button-root'). Supports className, css, style, aria-*, data-*,
data-testid, and nested slotProps for child Abyss components.
See slotProps for more information
visibleFrom
Breakpoint | undefined
When defined, the component is hidden until the screen width reaches the specified breakpoint.

V1Table Classes​

Class NameDescription
.abyss-table-bodyBody container
.abyss-table-cellCell element
.abyss-table-footerFooter
.abyss-table-footer-cellFooter cell
.abyss-table-footer-rowFooter row
.abyss-table-headHeader container
.abyss-table-headerHeader row container
.abyss-table-header-cell-containerHeader cell container
.abyss-table-header-containerHeader Container
.abyss-table-rootTable root element
.abyss-table-rowRow element
.abyss-table-styled-headerHeader Styled Container

V1Table.Container Classes​

Class NameDescription
.abyss-table-rootTable root element

V1Table.TableHeader Classes​

Class NameDescription
.abyss-table-headHeader container

V1Table.TableHeaderRow Classes​

Class NameDescription
.abyss-table-headerHeader row container

V1Table.Column Classes​

Class NameDescription
.abyss-table-header-cell-containerHeader cell container
.abyss-table-header-containerHeader Container
.abyss-table-styled-headerHeader Styled Container

V1Table.TableBody Classes​

Class NameDescription
.abyss-table-bodyBody container

V1Table.Row Classes​

Class NameDescription
.abyss-table-rowRow element

V1Table.Cell Classes​

Class NameDescription
.abyss-table-cellCell element

V1Table.FooterCell Classes​

Class NameDescription
.abyss-table-footer-cellFooter cell

Like an HTML table element, a WAI-ARIA table is a static tabular structure containing one or more rows that each contain one or more cells; it is not an interactive widget. Thus, its cells are not focusable or selectable. The grid pattern is used to make an interactive widget that has a tabular structure.

However, tables are often used to present a combination of information and interactive widgets. Since a table is not a widget, each widget contained in a table is a separate stop in the page tab sequence. If the number of widgets is large, replacing the table with a grid can dramatically reduce the length of the page tab sequence because a grid is a composite widget that can contain other widgets.

Adheres to the Table WAI-ARIA design patternopens in a new window.

Keyboard Interactions​

KeyDescription
Not ApplicableNot Applicable
Table of Contents