Components
← All components

Data Grid

stimeo--data-grid

Adds column sorting, row selection, and roving cell navigation to a table.

  • Grid

The stimeo--data-grid controller implements the WAI-ARIA Grid pattern plus aria-sort. The whole grid is a single Tab stop (roving tabindex: exactly one cell or header is 0, the rest -1) and the arrow keys move both DOM focus and that tabbable position; Home/End move within a row and Ctrl+Home/Ctrl+End across the grid. Enter/Space cycles a header's sort (none → ascending → descending, emitting the sort event) or toggles the focused row's selection when selection is enabled, syncing aria-selected and emitting selectionchange. It does not touch the data — the consumer performs the real sort/render (here demo.js reorders the rows on the sort event). No timers or observers are held, so there is nothing to leak across Turbo navigations. Behavior only — the look is yours.

running
Name Role Location
Ada Lovelace Engineer London
Grace Hopper Admiral New York
Alan Turing Researcher Manchester
Katherine Johnson Mathematician Hampton

Keyboard

KeyAction
→ / ← Move to the next / previous cell in the row.
↓ / ↑ Move to the next / previous cell in the column (headers included).
Home / End Move to the first / last cell of the row.
Ctrl+Home / Ctrl+End Move to the first / last cell of the grid.
Enter / Space Cycle a header's sort, or toggle the focused row's selection.