Skip to content
Hazine

Data tables

1 of 8 shipped. Each take is a different structure, and the note under its title says how.

  • data tables

    A disclosure button per row reveals a detail row spanning all columns, split into line items and an address and note rail. Several rows stay open and the header button opens them all.

    shadcn add @hazine/data-table-expandable-rows

    Depends on badge, button, table, @hazine/heading, @hazine/use-controllable-state, lucide-react

Planned 7

  • Sortable Data Table

    Baseline native table: sorting is the only interaction, expressed as header buttons with aria-sort on the th and a polite live region announcing the new order.

  • Grouped Row Table

    Rows are nested under collapsible group header rows that carry their own aggregates, with one tbody per group and a row-scoped th, changing the hierarchy from flat list to two levels.

    Pro
  • Pinned Column Table

    Sticky first and last columns inside a keyboard-focusable, labelled scroll region with scroll-state edge shadows, solving width overflow without hiding columns.

    Pro
  • Inline Editable Grid

    The only table in the family using role=grid: cell-level roving tabindex, edit mode per cell and a pending changes bar replace row-level actions.

    Pro
  • Summary Footer Table

    A sticky footer with per-column aggregates that recalculates for the current selection, making the summary a first-class part of the table instead of a separate stat row.

    Pro
  • Tree Table With Nested Rows

    The only table in the family with real hierarchy: rows carry aria-level, aria-setsize and aria-posinset, arrow keys traverse the tree, and aggregates roll up from child to parent, where grouped rows only offer one flat level of buckets.

    Pro
  • Responsive Stacking Table

    Two structures for one dataset, switched by container query: a native table when wide and a list of description-list cards when narrow, instead of horizontal scrolling.

    Pro