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';
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 leaf is also a named export of @lostgradient/cinder.

Set current to mark the row associated with an open review or detail pane. The row keeps an 18% tint of --cinder-accent-solid at rest and on hover, including in stacked cards.

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.
  • Marking the single row that represents the current record.
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).
current boolean false Marks the current row. The consumer is responsible for marking only one row current per table.
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.