Data Display

TableRow

Row within a table that groups header or body cells and participates in row-selection state when configured.

import { TableRow } from '@lostgradient/cinder/table-row';
tablerow
01

Overview

tr wrapper that groups a set of cells into a single table row.

Usage

TableRow is a compose-only leaf of Table. The idiomatic API is Table.Row, reached through the parent namespace — see the table README for the composed snippet. The flat @lostgradient/cinder/table-row subpath remains exported for à-la-carte builds that import the leaf directly.

02

When to use

Use when
  • Grouping table-cell or table-header-cell children into a single horizontal record.
  • Wiring per-row selection by passing the selection prop in a selectable table.
Avoid when
  • Standing alone outside a table — it requires the table section context.
03

Props

Props for table-row
Name
Type
Default
Description
children required snippet Cell children (TableCell or TableHeaderCell).
selected discriminated-union Whether the row's selection checkbox is checked. Required in selectable tables alongside onSelectedChange and selectionLabel.
onSelectedChange (next: boolean) => void
selectionLabel discriminated-union Accessible name for the disabled selection checkbox. Provide a localised string to override the English default ("Selection not allowed for this row"). The library cannot localise on the consumer's behalf, so this is the seam for non-English applications or custom phrasing.
selectionDisabled false When true, renders a disabled selection checkbox for this row, preventing selection while keeping the alignment cell.