<Tally> renders each row as a card instead of a table row. Cards use the same view, the same rows and the same selection as the grid. Tapping a card title opens a sheet with every visible field.
When cards show
The width is the width of the
<Tally> root, not of the window. A grid in a narrow sidebar switches to cards on a wide screen. The viewport carries data-layout="cards" while cards show.
Card roles
Every column has a card role. It decides where the column goes on the card.
The role comes from the column type. Set
card on a column to override it. Without a title column, the first visible column is the title. Hidden columns of the view are left out of cards and of the sheet.
schema.ts
avatar draws an initials tile before the title. subtitle names a field shown under the title. A meta column with wrap takes a full line.
Detail sheet
The sheet is a drawer. Its heading is the card title. The firstmetric column is the hero value, and every other visible column follows as a label and value pair, drawn with the same renderers as the grid.
Pass a function as detail to render the body yourself. It receives the grid, the row item and close. The heading and the close button stay.
accounts.tsx