Data Table Test

Tabular data component composing qds-column-header, qds-checkbox, qds-row-actions, qds-pagination, and qds-empty-state.

Default

Basic data table with sortable columns and financial data.

Resize columns and retain a review layout

Widen company names during a portfolio review. resizable-columns opts in; Symbol is locked with resizable: false. Company is bounded from 120px to 400px. Neighboring columns retain their widths while the table grows or shrinks, with horizontal scrolling for overflow.

Drag a header separator, or focus it and use Left/Right Arrow (8px), Shift+Arrow (32px), Home (minimum) or End (configured maximum). Escape cancels a drag. Use the table's Column widths button to choose a column and enter a width without dragging; Cancel preserves the layout.

Committed changes are saved in this browser by the example. Sort or refresh rows to verify retained widths. Reset restores the authored sizing and clears saved preferences. The table itself does not access browser storage.

Authored column sizing is active.

{}

Enable only one column

This table has no resizable-columns attribute. Company alone uses resizable: true, with relative bounds of 8rem and 25rem. Symbol and Market value keep their authored widths.

Sticky columns, horizontal overflow and RTL

In this right-to-left table, Company sticks to the logical start (right) and locked Symbol to the logical end (left). Resize Company, then scroll horizontally to check the sticky edges. Arrow keys move the visible separator in the corresponding direction. Use the documentation toolbar to exercise the examples in light and dark modes.

All Densities

Small (32px), medium (40px), and large (48px) row heights.

Striped

Zebra striping enabled; row borders remain.

Sorted Ascending

Pre-sorted by market value ascending.

Multi-Sort

Sorted by weight descending, then symbol ascending.

Selection Partial

Selectable with some rows pre-selected; header checkbox shows indeterminate.

Selection All

All rows selected; header checkbox is checked.

Row Hover

Hover state uses --button-hover-bg. (Hover a row to see.)

Row Focused

Focused row gets a 4px --theme-accent-primary marker on its first cell. (Click a row, then use arrow keys.)

Sticky Header Scrolled

Header sticks to the top of the scroll container. The height constraint must be on qds-data-table itself, not an outer wrapper — the table's own [part="scroll"] region is what actually scrolls and owns the sticky reference, via its internal flex layout.

Sticky Column Scrolled

Symbol column sticks to the left edge when scrolling horizontally.

Sticky Header and Column Corner

The intersection of sticky header and sticky column needs a higher z-index.

With Toolbar

Toolbar slot for filters, search, and bulk actions.

With Pagination

Client-side pagination at 10 rows per page.

Empty

Zero rows renders qds-empty-state with empty-title.

Loading Skeletons

Loading state renders skeleton rows with aria-busy on the table.

Narrow Container Compact Pagination

In a narrow panel the pagination should remain usable.

Financial Columns Alignment

Mixed magnitudes across number, currency, and percent columns — the important alignment regression test.

Dark Theme

Table under dark theme via data-theme="dark".