Structured grids of rows and columns for displaying, organising, and comparing large sets of data.
The compact path: pass .columns + .rows and
sc-table-dynamic generates the markup, delegating sorting, selection, and
pagination to sc-table-basic. The table holds no data of its own — you own the
rows. Click a header to sort.
The end-to-end dynamic pattern — fetch JSON, map it into rows, and assign
.rows. This table is populated live from a public REST endpoint on load.
Cell values can be Lit templates, not just text. Here a select column drives row
selection, desc renders an avatar + reference line, and
debit/credit are colour-coded amounts.
Icon columns via leadingIcon(row) (star, attachment) and a two-line cell via
secondaryText(row) for the message preview.
Link columns via href(row) render real anchors, and the author cell is an
avatar + name template.
Compose rows and cells yourself for full control. A header row holds
sc-table-head cells; sortable turns a head into a sort control;
selected paints the active row.
The four primitives the layers above are built from — sc-table-head,
sc-table-cell, sc-table-footer, and sc-table-row.
tabular data with sorting, selection, and
pagination. Reach for sc-table-dynamic first; drop to the building blocks only when
you need bespoke layout.
sc-table-dynamic first; drop to the building blocks only for bespoke layouts.role="table" with role="row", role="columnheader", and role="cell" on its parts.label sets the table’s aria-label; always provide one.aria-sort (ascending / descending).href columns render real anchors; leading icons are decorative, so the cell text must carry the meaning.