BalanceReckon Design System
LayoutTable

Table

Composable table primitives for building data tables that fit your application constraints.

TableProps

PropTypeRequiredDefaultDescription
'aria-colcount'number——When only a subset of columns are present, use the aria-colcount attribute to let assistive technologies know how many columns the table would have if all columns were present.
'aria-describedby'string——Provide the ID of an element that describes the table.
'aria-rowcount'number——When only a subset of rows are loaded, for virtualized or paginated results, use the aria-rowcount attribute to let assistive technologies know how many rows the table would have if all rows were present.
alignYCellAlignY
top|center|bottom
—centerSets the vertical alignment for content within each cell.
childrenReactNodeYes—The elements that make up the table.
densityCellDensity
compact|regular|spacious
—regularSets the amount of vertical padding within each cell.
overflowStrategyCellOverflowStrategy
wrap|truncate
—truncateSets the overflow behavior for the text content of each cell.
Also accepts LabelProps

TableCellProps

PropTypeRequiredDefaultDescription
'aria-colindex'number——When only a subset of columns are present, use the aria-colindex attribute to let assistive technologies know what portions of the content are being displayed, and that all the table's content is not present.
'aria-colspan'number——The aria-colspan attribute defines the number of columns spanned by an individual cell. The value should be a positive integer.
'aria-rowspan'number——The aria-rowspan attribute defines the number of rows spanned by an individual cell. The value should be a positive integer.
alignCellAlign
left|center|right
—leftSets the horizontal alignment of cell contents.
alignY
top|bottom|center
—centerSets the vertical alignment for content within each cell.
childrenReactNodeYes—The contents of the cell.
flexnumber——Shares spare width between cells in proportion to this number - seed it with the column's intended pixel width. Takes precedence over `width`, as AG Grid's `flex` does.
idstring——Optionally provide an ID.
maxWidthnumber | string——Sets the maximum width of the cell.
minWidthnumber | string——Sets the minimum width of the cell.
role
gridcell|rowheader|columnheader
—gridcellThe role of the cell.
showDividerboolean—stickyOffset !== undefinedWhether the cell should render a divider between it and the next cell.
stickyEdge
left|right
——Which edge the cell sticks to. Defaults to the sign of `stickyOffset`.
stickyOffsetnumber——Applies "sticky" positioning to the cell, offset relative to its nearest scrolling ancestor. The edge defaults to the sign of the value — negative offsets stick to the right — but prefer `stickyEdge` to say so outright. `-0` cannot express a right edge: build pipelines constant-fold it to `0`, silently turning the cell back into a left-sticky one.
UNSAFE_styleCSSProperties——Sets the inline [style](https://reactjs.org/docs/dom-elements.html#style) for the element. Only use as a **last resort**.
widthnumber | string——Sets the width of the cell.

TableColumnHeaderProps

PropTypeRequiredDefaultDescription
'aria-sort'SortDirection
ascending|descending
——The aria-sort attribute indicates if items in a table or grid are sorted in ascending or descending order.
alignCellAlign
left|center|right
—leftSets the horizontal alignment of cell contents.
alignY
top|bottom|center
—centerSets the vertical alignment for content within each cell.
flexnumber——Shares spare width between cells in proportion to this number - seed it with the column's intended pixel width. Takes precedence over `width`, as AG Grid's `flex` does.
maxWidthnumber | string——Sets the maximum width of the cell.
minWidthnumber | string——Sets the minimum width of the cell.
onClick() => void——The callback to run when a user clicks the column header. Typically reserved for sort behaviour.
showDividerboolean—stickyOffset !== undefinedWhether the cell should render a divider between it and the next cell.
stickyEdge
left|right
——Which edge the cell sticks to. Defaults to the sign of `stickyOffset`.
stickyOffsetnumber——Applies "sticky" positioning to the cell, offset relative to its nearest scrolling ancestor. The edge defaults to the sign of the value — negative offsets stick to the right — but prefer `stickyEdge` to say so outright. `-0` cannot express a right edge: build pipelines constant-fold it to `0`, silently turning the cell back into a left-sticky one.
tooltipPick<TooltipProps, 'content'>['content']———
UNSAFE_styleCSSProperties——Sets the inline [style](https://reactjs.org/docs/dom-elements.html#style) for the element. Only use as a **last resort**.
widthnumber | string——Sets the width of the cell.
Also accepts Omit<TableCellProps, 'role'>

TableBodyProps

PropTypeRequiredDefaultDescription
childrenReactNodeYes—The elements that make up the table body.
UNSAFE_styleCSSProperties——Sets inline [style](https://reactjs.org/docs/dom-elements.html#style) for the element. Only use as a **last resort**.

TableFootProps

PropTypeRequiredDefaultDescription
childrenReactNodeYes—The elements that make up the table footer.
stickyOffsetnumber———
UNSAFE_styleCSSProperties——Sets inline [style](https://reactjs.org/docs/dom-elements.html#style) for the element. Only use as a **last resort**. Use style props instead.

TableHeadProps

PropTypeRequiredDefaultDescription
childrenReactNodeYes—The elements that make up the table header.
stickyOffsetnumber———

TableGroupProps

PropTypeRequiredDefaultDescription
childrenReactNodeYes——
header(props: { expanded: boolean; triggerProps: TriggerProps; }) => ReactElementYes——
initialExpandedboolean—true—
UNSAFE_styleCSSProperties——Sets inline [style](https://reactjs.org/docs/dom-elements.html#style) for the element. Only use as a **last resort**.

TableGroupHeaderProps

PropTypeRequiredDefaultDescription
'aria-colspan'number———
childrenReactNodeYes——
UNSAFE_styleCSSProperties——Sets inline [style](https://reactjs.org/docs/dom-elements.html#style) for the element. Only use as a **last resort**.

TableRowProps

PropTypeRequiredDefaultDescription
'aria-rowindex'number——When only a subset of rows are loaded, for virtualization or pagination, use the aria-rowindex attribute to let assistive technologies know what portions of the content are being displayed, and that all the table's content is not present.
'aria-selected'boolean———
alignY
top|center|bottom
—centerFor vertical alignemtn of all cell content in this row.
childrenReactNodeYes—The elements that make up the table row.
disabledboolean———
status'dragging'——Sets the interaction status.
tone
critical|positive|cautious
——Sets the background colour for the row.
UNSAFE_styleCSSProperties——Sets inline [style](https://reactjs.org/docs/dom-elements.html#style) for the element. Only use as a **last resort**.

TableSelectionCellProps

PropTypeRequiredDefaultDescription
'aria-label'stringYes——
Also accepts Pick< TableCellProps, | 'aria-colindex' | 'id' | 'role' | 'showDivider' | 'stickyEdge' | 'stickyOffset' >, Pick<CheckboxPrimitiveProps, Keys<typeof validCheckboxKeys>>