Table gallery
Ready-made c2-table setups: columns and formats, sorting and selection, grouping, toolbars and footers, states, and looks from a hairline report to a trading terminal.
Columns and data
Every card is a rows array plus a set of c2-table-column children: width takes any grid track, align moves the text, format runs the value through Intl (number, currency, percent, date, datetime, time), and pinned sticks a column to either edge while the rest scrolls. A cell value is text, so a column is dressed up from CSS: ::part(cell-content-status) is the text of the status column and takes a pill as well as any badge would. Put a component in a cell with a renderCell function from script.
<style>
.plain {
height: 296px;
width: 100%;
}
</style>
<c2-table client:only="lit" class="plain" row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.formats {
height: 296px;
width: 100%;
}
</style>
<c2-table client:only="lit" class="formats" row-key="id" rows='[{"id":"1","order":"#10841","customer":"Northwind Trading","channel":"Online","items":12,"total":8420.5,"margin":0.182,"status":"Paid","placed":"2026-02-11T09:24:00Z"},{"id":"2","order":"#10840","customer":"Contoso Ltd","channel":"Partner","items":4,"total":1290,"margin":0.241,"status":"Pending","placed":"2026-02-11T08:02:00Z"},{"id":"3","order":"#10839","customer":"Fabrikam","channel":"Online","items":31,"total":18640.75,"margin":0.129,"status":"Paid","placed":"2026-02-10T17:41:00Z"},{"id":"4","order":"#10838","customer":"Tailspin Toys","channel":"Retail","items":7,"total":3150.2,"margin":0.204,"status":"Refunded","placed":"2026-02-10T14:15:00Z"},{"id":"5","order":"#10837","customer":"Adventure Works","channel":"Partner","items":19,"total":9875,"margin":0.163,"status":"Paid","placed":"2026-02-09T11:58:00Z"},{"id":"6","order":"#10836","customer":"Wide World Importers","channel":"Online","items":2,"total":480.9,"margin":0.315,"status":"Pending","placed":"2026-02-09T10:07:00Z"}]'>
<c2-table-column field="order" header="Order" width="110px"></c2-table-column>
<c2-table-column field="customer" header="Customer" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="items" header="Items" width="90px" align="end" format="number"></c2-table-column>
<c2-table-column field="total" header="Total" width="130px" align="end" format="currency" currency="EUR"></c2-table-column>
<c2-table-column field="margin" header="Margin" width="100px" align="end" format="percent"></c2-table-column>
<c2-table-column field="placed" header="Placed" width="180px" align="end" format="datetime"></c2-table-column>
</c2-table><style>
.aligned {
height: 296px;
width: 100%;
}
</style>
<c2-table client:only="lit" class="aligned" row-key="id" rows='[{"id":"1","service":"api-gateway","region":"eu-west-1","tier":"Edge","uptime":0.9998,"p95":124,"requests":1284000,"state":"Healthy"},{"id":"2","service":"auth","region":"eu-west-1","tier":"Core","uptime":0.9991,"p95":86,"requests":642000,"state":"Healthy"},{"id":"3","service":"billing","region":"us-east-1","tier":"Core","uptime":0.9912,"p95":412,"requests":98400,"state":"Degraded"},{"id":"4","service":"search","region":"us-east-1","tier":"Edge","uptime":0.9975,"p95":238,"requests":874000,"state":"Healthy"},{"id":"5","service":"notifications","region":"ap-south-1","tier":"Async","uptime":0.9834,"p95":1840,"requests":41200,"state":"Down"},{"id":"6","service":"reports","region":"eu-west-1","tier":"Async","uptime":0.9989,"p95":690,"requests":18600,"state":"Healthy"}]'>
<c2-table-column field="service" header="Service" width="minmax(140px, 2fr)"></c2-table-column>
<c2-table-column field="region" header="Region" width="1fr"></c2-table-column>
<c2-table-column field="tier" header="Tier" width="100px" align="center"></c2-table-column>
<c2-table-column field="state" header="State" width="110px" align="center"></c2-table-column>
<c2-table-column field="uptime" header="Uptime" width="110px" align="end" format="percent" format-options='{"minimumFractionDigits":2}'></c2-table-column>
<c2-table-column field="p95" header="p95 (ms)" width="100px" align="end" format="number"></c2-table-column>
<c2-table-column field="requests" header="Requests" width="120px" align="end" format="number"></c2-table-column>
</c2-table><style>
.pinned {
height: 296px;
width: 100%;
--c2-table__pinned-start--box-shadow: 2px 0 0 0 var(--c2-theme--color-outline-variant, #e4e4e7);
--c2-table__pinned-end--box-shadow: -2px 0 0 0 var(--c2-theme--color-outline-variant, #e4e4e7);
}
</style>
<c2-table client:only="lit" class="pinned" row-key="id" rows='[{"id":"1","order":"#10841","customer":"Northwind Trading","channel":"Online","items":12,"total":8420.5,"margin":0.182,"status":"Paid","placed":"2026-02-11T09:24:00Z"},{"id":"2","order":"#10840","customer":"Contoso Ltd","channel":"Partner","items":4,"total":1290,"margin":0.241,"status":"Pending","placed":"2026-02-11T08:02:00Z"},{"id":"3","order":"#10839","customer":"Fabrikam","channel":"Online","items":31,"total":18640.75,"margin":0.129,"status":"Paid","placed":"2026-02-10T17:41:00Z"},{"id":"4","order":"#10838","customer":"Tailspin Toys","channel":"Retail","items":7,"total":3150.2,"margin":0.204,"status":"Refunded","placed":"2026-02-10T14:15:00Z"},{"id":"5","order":"#10837","customer":"Adventure Works","channel":"Partner","items":19,"total":9875,"margin":0.163,"status":"Paid","placed":"2026-02-09T11:58:00Z"},{"id":"6","order":"#10836","customer":"Wide World Importers","channel":"Online","items":2,"total":480.9,"margin":0.315,"status":"Pending","placed":"2026-02-09T10:07:00Z"}]'>
<c2-table-column field="order" header="Order" width="120px" pinned="start"></c2-table-column>
<c2-table-column field="customer" header="Customer" width="260px"></c2-table-column>
<c2-table-column field="channel" header="Channel" width="160px"></c2-table-column>
<c2-table-column field="items" header="Items" width="140px" align="end" format="number"></c2-table-column>
<c2-table-column field="total" header="Total" width="180px" align="end" format="currency"></c2-table-column>
<c2-table-column field="margin" header="Margin" width="140px" align="end" format="percent"></c2-table-column>
<c2-table-column field="placed" header="Placed" width="200px" align="end" format="date"></c2-table-column>
<c2-table-column field="status" header="Status" width="120px" align="center" pinned="end"></c2-table-column>
</c2-table><style>
.resizable {
height: 296px;
width: 100%;
--c2-table__resizer--color: var(--c2-theme--color-outline-variant, #e4e4e7);
--c2-table__resizer__hover--color: rgb(2, 101, 220);
}
</style>
<c2-table client:only="lit" class="resizable" resizable row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.pills {
height: 296px;
width: 100%;
}
.pills::part(cell-content-status) {
padding: 2px 10px;
border-radius: 999px;
font-size: 12px;
font-weight: 500;
color: color-mix(in srgb, var(--c2-theme--color-on-surface, #18181b) 82%, var(--c2-theme--color-surface, #ffffff));
background: var(--c2-theme--color-surface-container, #f4f4f5);
}
.pills::part(cell-content-team) {
padding: 2px 10px;
border-radius: 6px;
font-size: 12px;
color: light-dark(#3730a3, #837ec4);
background: light-dark(#eef2ff, #151c36);
}
</style>
<c2-table client:only="lit" class="pills" sortable row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="130px" align="start"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="120px" align="start"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.hidden-col {
height: 296px;
width: 100%;
}
</style>
<c2-table client:only="lit" class="hidden-col" row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr" hidden></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table>Sorting and selection
sortable makes every header a sort control and sort="field:asc" sets the starting order; multi-sort lets a shift-click add a second key. Selection is single or multiple, with checkbox-selection for a leading checkbox column, and value holds the selected row keys — ;-separated in markup.
<style>
.sortable-card {
height: 296px;
width: 100%;
--c2-table__header-cell__hover--background: var(--c2-theme--color-surface-container, #f4f4f5);
}
</style>
<c2-table client:only="lit" class="sortable-card" sortable row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.sorted {
height: 296px;
width: 100%;
--c2-table__header-cell__sorted--color: var(--c2-theme--color-primary, #0265dc);
--c2-table__sort-icon__active--color: rgb(2, 101, 220);
}
</style>
<c2-table client:only="lit" class="sorted" sortable sort="score:desc" row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.multi {
height: 296px;
width: 100%;
--c2-table__header-cell__sorted--color: var(--c2-theme--color-on-surface, #18181b);
}
</style>
<c2-table client:only="lit" class="multi" sortable multi-sort sort="team:asc;score:desc" row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.some-sortable {
height: 296px;
width: 100%;
}
</style>
<c2-table client:only="lit" class="some-sortable" row-key="id" rows='[{"id":"1","service":"api-gateway","region":"eu-west-1","tier":"Edge","uptime":0.9998,"p95":124,"requests":1284000,"state":"Healthy"},{"id":"2","service":"auth","region":"eu-west-1","tier":"Core","uptime":0.9991,"p95":86,"requests":642000,"state":"Healthy"},{"id":"3","service":"billing","region":"us-east-1","tier":"Core","uptime":0.9912,"p95":412,"requests":98400,"state":"Degraded"},{"id":"4","service":"search","region":"us-east-1","tier":"Edge","uptime":0.9975,"p95":238,"requests":874000,"state":"Healthy"},{"id":"5","service":"notifications","region":"ap-south-1","tier":"Async","uptime":0.9834,"p95":1840,"requests":41200,"state":"Down"},{"id":"6","service":"reports","region":"eu-west-1","tier":"Async","uptime":0.9989,"p95":690,"requests":18600,"state":"Healthy"}]'>
<c2-table-column field="service" header="Service" width="minmax(140px, 2fr)" sortable></c2-table-column>
<c2-table-column field="region" header="Region" width="1fr"></c2-table-column>
<c2-table-column field="tier" header="Tier" width="100px" align="center"></c2-table-column>
<c2-table-column field="uptime" header="Uptime" width="110px" align="end" format="percent" format-options='{"minimumFractionDigits":2}' sortable></c2-table-column>
<c2-table-column field="p95" header="p95 (ms)" width="110px" align="end" format="number" sortable></c2-table-column>
<c2-table-column field="requests" header="Requests" width="120px" align="end" format="number" sortable></c2-table-column>
</c2-table><style>
.checkbox-card {
height: 296px;
width: 100%;
--c2-table__row__selected--background: var(--c2-theme--color-primary-container, #edf1fe);
--c2-table__row__selected--color: var(--c2-theme--color-on-surface, #18181b);
--c2-table__selection-cell--width: 44px;
}
</style>
<c2-table client:only="lit" class="checkbox-card" selection="multiple" checkbox-selection value="2;4" sortable row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.single-card {
height: 296px;
width: 100%;
--c2-table__row__selected--background: var(--c2-theme--color-inverse-surface, #18181b);
--c2-table__row__selected--color: var(--c2-theme--color-on-primary, #ffffff);
}
</style>
<c2-table client:only="lit" class="single-card" selection="single" value="3" row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table>Realtime updates
animate-updates belongs to the table, so a feed assigns only its next real snapshot—even when it adds, deletes and
modifies rows in one operation. The table matches rows by row-key, expands additions, collapses removals and
interpolates finite numbers over update-duration; nested numeric arrays are included. This means the price, derived
percentage, row background and the c2-sparkline returned by renderCell all receive one synchronized intermediate
row. This example uses rowStyle for a persistent threshold: red at or below 30% of the day’s range, green at or above
70%, and neutral between them. Prices move by no more than about 0.08% per tick, so a row keeps its regime instead of
flickering between colors. Every third replay tick performs an add or delete so all update paths stay visible.
<style>
.market-watchlist {
display: grid;
width: 100%;
gap: 10px;
--c2-chart--width: 156px;
--c2-chart--height: 34px;
--c2-chart--padding: 2px;
--c2-chart--border-top: 0;
--c2-chart--border-right: 0;
--c2-chart--border-bottom: 0;
--c2-chart--border-left: 0;
--c2-chart--background: transparent;
}
.market-watchlist c2-table {
width: 100%;
height: 326px;
--c2-table__header--height: 42px;
--c2-table__row--height: 56px;
--c2-table__row--border-bottom: 1px solid var(--c2-theme--color-outline-variant);
}
.market-controls {
display: flex;
align-items: center;
gap: 12px;
color: var(--c2-theme--color-on-surface-variant);
font-size: 12px;
}
</style>
<div class="market-watchlist" data-market-table>
<c2-table client:only="lit" row-key="symbol" animate-updates update-duration="720"></c2-table>
<div class="market-controls">
<c2-button>Pause</c2-button>
<span data-market-status>Preparing replay…</span>
</div>
</div>The update loop does not calculate frames:
table.rowStyle = ({ row }) => {
const position = (row.price - row.low) / (row.high - row.low)
const background = position <= 0.3 ? 'color-mix(in srgb, #dc2626 9%, transparent)' : position >= 0.7 ? 'color-mix(in srgb, #16a34a 9%, transparent)' : 'transparent'
return { background, transition: 'background 240ms ease-out' }
}
setInterval(() => {
// The new snapshot can add, delete and modify rows at the same time.
table.rows = nextMarketSnapshot(table.rows)
}, 1200)Only the rendered window is interpolated, keeping the cost bounded when virtualization is active. Reduced-motion preferences turn this into an immediate update automatically.
Toolbar and footer
The toolbar and footer slots are yours, and they are the natural place for the rest of the library: c2-text-field for a search, c2-select for a filter, c2-button and c2-icon-button for actions, c2-badge for a count. Both bars stay outside the scrolling body and are hidden until something is slotted into them; --c2-table__toolbar--* and --c2-table__footer--* set their padding, background and divider.
A c2-pagination in the footer is wired up rather than decorative: the table pages its rows and drives the pager’s page, page-size and total-items, so the card below works with nothing but the two elements. With a dataSource the same markup pages server-side, one request per page.
<style>
.toolbar-title {
height: 320px;
width: 100%;
--c2-table__toolbar--padding: 10px 12px;
--c2-table__toolbar--background: var(--c2-theme--color-surface-container-low, #fafafa);
}
.toolbar-title .bar {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
}
.toolbar-title .title {
font-size: 14px;
font-weight: 600;
margin-right: auto;
}
.toolbar-title .ghost {
--c2-button__container--background-color: var(--c2-theme--color-surface, #ffffff);
--c2-button__container--color: var(--c2-theme--color-on-surface, #18181b);
--c2-button__container--border: 1px solid var(--c2-theme--color-outline-variant, #e4e4e7);
--c2-button__container__hover--background-color: var(--c2-theme--color-surface-container, #f4f4f5);
}
</style>
<c2-table client:only="lit" class="toolbar-title" sortable row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<div class="bar" slot="toolbar">
<span class="title">Team scorecard</span>
<c2-badge tone="neutral">6 people</c2-badge>
<c2-button class="ghost">Export</c2-button>
<c2-button>Add person</c2-button>
</div>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.toolbar-search {
height: 320px;
width: 100%;
--c2-table__toolbar--padding: 10px 12px;
}
.toolbar-search .bar {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
}
.toolbar-search .search {
flex: 1;
--c2-text-field--min-height: 32px;
}
</style>
<c2-table client:only="lit" class="toolbar-search" sortable row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<div class="bar" slot="toolbar">
<c2-text-field
class="search"
placeholder="Search people"
oninput="const table = this.closest('c2-table'); table.allRows ??= table.rows; table.rows = table.allRows.filter((row) => Object.values(row).join(' ').toLowerCase().includes(this.value.toLowerCase())); this.nextElementSibling.textContent = table.rows.length + ' of ' + table.allRows.length"
></c2-text-field>
<c2-badge tone="neutral">6 of 6</c2-badge>
</div>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.toolbar-filters {
height: 320px;
width: 100%;
--c2-table__toolbar--padding: 10px 12px;
--c2-table__toolbar--border-bottom: 1px solid var(--c2-theme--color-outline-variant, #e4e4e7);
}
.toolbar-filters .bar {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
}
.toolbar-filters .picker {
width: 150px;
--c2-select__button--min-height: 32px;
}
.toolbar-filters .range {
width: 170px;
margin-left: auto;
--c2-select__button--min-height: 32px;
}
</style>
<c2-table client:only="lit" class="toolbar-filters" sortable row-key="id" rows='[{"id":"1","service":"api-gateway","region":"eu-west-1","tier":"Edge","uptime":0.9998,"p95":124,"requests":1284000,"state":"Healthy"},{"id":"2","service":"auth","region":"eu-west-1","tier":"Core","uptime":0.9991,"p95":86,"requests":642000,"state":"Healthy"},{"id":"3","service":"billing","region":"us-east-1","tier":"Core","uptime":0.9912,"p95":412,"requests":98400,"state":"Degraded"},{"id":"4","service":"search","region":"us-east-1","tier":"Edge","uptime":0.9975,"p95":238,"requests":874000,"state":"Healthy"},{"id":"5","service":"notifications","region":"ap-south-1","tier":"Async","uptime":0.9834,"p95":1840,"requests":41200,"state":"Down"},{"id":"6","service":"reports","region":"eu-west-1","tier":"Async","uptime":0.9989,"p95":690,"requests":18600,"state":"Healthy"}]'>
<div class="bar" slot="toolbar">
<c2-select class="picker" value="all" aria-label="Region">
<c2-list-item value="all">All regions</c2-list-item>
<c2-list-item value="eu">eu-west-1</c2-list-item>
<c2-list-item value="us">us-east-1</c2-list-item>
<c2-list-item value="ap">ap-south-1</c2-list-item>
</c2-select>
<c2-badge tone="danger">1 down</c2-badge>
<c2-badge tone="warning">1 degraded</c2-badge>
<c2-select class="range" value="24h" aria-label="Time range">
<c2-list-item value="24h">Last 24 hours</c2-list-item>
<c2-list-item value="7d">Last 7 days</c2-list-item>
<c2-list-item value="30d">Last 30 days</c2-list-item>
</c2-select>
</div>
<c2-table-column field="service" header="Service" width="minmax(140px, 2fr)"></c2-table-column>
<c2-table-column field="region" header="Region" width="1fr"></c2-table-column>
<c2-table-column field="tier" header="Tier" width="100px" align="center"></c2-table-column>
<c2-table-column field="state" header="State" width="110px" align="center"></c2-table-column>
<c2-table-column field="uptime" header="Uptime" width="110px" align="end" format="percent" format-options='{"minimumFractionDigits":2}'></c2-table-column>
<c2-table-column field="p95" header="p95 (ms)" width="110px" align="end" format="number"></c2-table-column>
</c2-table><style>
.footer-total {
height: 330px;
width: 100%;
--c2-table__footer--padding: 10px 12px;
--c2-table__footer--background: var(--c2-theme--color-surface-container-low, #fafafa);
--c2-table__footer--border-top: 1px solid var(--c2-theme--color-outline-variant, #e4e4e7);
}
.footer-total .bar {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
}
.footer-total .label {
font-size: 12px;
color: var(--c2-theme--color-on-surface-variant, #71717a);
}
.footer-total .total {
margin-left: auto;
font-size: 13px;
font-weight: 600;
font-variant-numeric: tabular-nums;
}
</style>
<c2-table client:only="lit" class="footer-total" sortable row-key="id" rows='[{"id":"1","order":"#10841","customer":"Northwind Trading","channel":"Online","items":12,"total":8420.5,"margin":0.182,"status":"Paid","placed":"2026-02-11T09:24:00Z"},{"id":"2","order":"#10840","customer":"Contoso Ltd","channel":"Partner","items":4,"total":1290,"margin":0.241,"status":"Pending","placed":"2026-02-11T08:02:00Z"},{"id":"3","order":"#10839","customer":"Fabrikam","channel":"Online","items":31,"total":18640.75,"margin":0.129,"status":"Paid","placed":"2026-02-10T17:41:00Z"},{"id":"4","order":"#10838","customer":"Tailspin Toys","channel":"Retail","items":7,"total":3150.2,"margin":0.204,"status":"Refunded","placed":"2026-02-10T14:15:00Z"},{"id":"5","order":"#10837","customer":"Adventure Works","channel":"Partner","items":19,"total":9875,"margin":0.163,"status":"Paid","placed":"2026-02-09T11:58:00Z"},{"id":"6","order":"#10836","customer":"Wide World Importers","channel":"Online","items":2,"total":480.9,"margin":0.315,"status":"Pending","placed":"2026-02-09T10:07:00Z"}]'>
<div class="bar" slot="footer">
<c2-badge tone="neutral">6 orders</c2-badge>
<span class="total">€41,857.35</span>
</div>
<c2-table-column field="order" header="Order" width="110px"></c2-table-column>
<c2-table-column field="customer" header="Customer" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="channel" header="Channel" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px" align="center"></c2-table-column>
<c2-table-column field="items" header="Items" width="90px" align="end" format="number"></c2-table-column>
<c2-table-column field="total" header="Total" width="130px" align="end" format="currency"></c2-table-column>
</c2-table><style>
.footer-pager {
height: 330px;
width: 100%;
--c2-table__footer--padding: 6px 8px;
}
.footer-pager c2-pagination {
width: 100%;
--c2-pagination--justify-content: flex-end;
--c2-pagination__label--font-size: 12px;
}
</style>
<c2-table client:only="lit" class="footer-pager" sortable row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"},{"id":"7","name":"Margaret Hamilton","team":"Flight","role":"Principal","score":54300,"status":"Active","updated":"2026-02-08"},{"id":"8","name":"Jean Bartik","team":"Compilers","role":"Senior","score":49700,"status":"Active","updated":"2026-01-30"},{"id":"9","name":"Frances Allen","team":"Compilers","role":"Distinguished","score":47200,"status":"Active","updated":"2026-02-03"}]'>
<c2-pagination slot="footer" variant="compact" page-size="4" page-size-options="4,8"></c2-pagination>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table>Totals
A column with summary="sum" (or avg, min, max, count) adds a totals row. It is a row of the same grid, so each figure sits in its own column’s track — through resizing, pinning and horizontal scroll — takes the column’s format and alignment, and stays at the bottom of the viewport while the rows scroll under it. summary-label writes text into a column with no figure, and summary-span stretches it over the columns after it. Style it with the --c2-table__summary--* variables, or one column’s figure with ::part(summary-content-<id>).
<style>
.invoice {
height: 296px;
width: 100%;
}
</style>
<c2-table client:only="lit" class="invoice" row-key="id" rows='[{"id":"1","task":"Design review","team":"Design","hours":12,"rate":95,"amount":1140},{"id":"2","task":"Component audit","team":"Engineering","hours":18,"rate":110,"amount":1980},{"id":"3","task":"Accessibility pass","team":"Engineering","hours":9,"rate":120,"amount":1080},{"id":"4","task":"Copywriting","team":"Content","hours":6,"rate":80,"amount":480},{"id":"5","task":"Icon set","team":"Design","hours":14,"rate":95,"amount":1330},{"id":"6","task":"Release notes","team":"Content","hours":3,"rate":80,"amount":240},{"id":"7","task":"Performance budget","team":"Engineering","hours":11,"rate":120,"amount":1320},{"id":"8","task":"Onboarding flow","team":"Design","hours":16,"rate":95,"amount":1520},{"id":"9","task":"Docs migration","team":"Content","hours":10,"rate":80,"amount":800},{"id":"10","task":"QA sweep","team":"Engineering","hours":8,"rate":110,"amount":880}]'>
<c2-table-column field="task" header="Task" width="minmax(160px, 2fr)" summary-label="Total" summary-span="2"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="hours" header="Hours" width="90px" align="end" format="number" summary="sum"></c2-table-column>
<c2-table-column field="rate" header="Rate" width="100px" align="end" format="currency" summary="avg"></c2-table-column>
<c2-table-column field="amount" header="Amount" width="120px" align="end" format="currency" summary="sum"></c2-table-column>
</c2-table><style>
.ledger {
height: 296px;
width: 100%;
--c2-table__summary--background: var(--c2-theme--color-inverse-surface, #18181b);
--c2-table__summary--color: var(--c2-theme--color-on-inverse-surface, #fafafa);
--c2-table__summary--box-shadow: none;
--c2-table__summary--height: 40px;
}
.ledger::part(summary-content-amount) {
padding: 2px 8px;
border-radius: 999px;
background: rgb(21, 128, 61);
color: var(--c2-theme--color-on-fill, #ffffff);
}
</style>
<c2-table client:only="lit" class="ledger" row-key="id" rows='[{"id":"1","task":"Design review","team":"Design","hours":12,"rate":95,"amount":1140},{"id":"2","task":"Component audit","team":"Engineering","hours":18,"rate":110,"amount":1980},{"id":"3","task":"Accessibility pass","team":"Engineering","hours":9,"rate":120,"amount":1080},{"id":"4","task":"Copywriting","team":"Content","hours":6,"rate":80,"amount":480},{"id":"5","task":"Icon set","team":"Design","hours":14,"rate":95,"amount":1330},{"id":"6","task":"Release notes","team":"Content","hours":3,"rate":80,"amount":240},{"id":"7","task":"Performance budget","team":"Engineering","hours":11,"rate":120,"amount":1320},{"id":"8","task":"Onboarding flow","team":"Design","hours":16,"rate":95,"amount":1520},{"id":"9","task":"Docs migration","team":"Content","hours":10,"rate":80,"amount":800},{"id":"10","task":"QA sweep","team":"Engineering","hours":8,"rate":110,"amount":880}]'>
<c2-table-column field="task" header="Task" width="200px" pinned="start" summary="count"></c2-table-column>
<c2-table-column field="team" header="Team" width="160px"></c2-table-column>
<c2-table-column field="hours" header="Hours" width="120px" align="end" format="number" summary="sum"></c2-table-column>
<c2-table-column field="rate" header="Rate" width="120px" align="end" format="currency" summary="max"></c2-table-column>
<c2-table-column field="amount" header="Amount" width="160px" align="end" format="currency" summary="sum"></c2-table-column>
</c2-table>Grouping
group-by gathers the rows into collapsible groups, outermost level first: group-by="region,status" nests the statuses of each region. By default each group is a row of the grid — its label and row count in the first column, and under every column with a summary that figure for the group’s rows, so subtotals line up with the totals row. group-display="band" draws a full-width band per group instead. The groups of the rows at the top of the view stay under the header while they scroll, a group’s checkbox selects its rows, and groups-collapsed starts them closed. The table does not ship a “group by” picker: the last card builds one from a c2-button-group in the toolbar slot that sets groupBy.
<style>
.grouped-rows {
height: 360px;
width: 100%;
}
</style>
<c2-table client:only="lit" class="grouped-rows" row-key="id" group-by="region,status" selection="multiple" checkbox-selection rows='[{"id":"o1","customer":"Acme GmbH","region":"EMEA","status":"Paid","amount":12400,"qty":16},{"id":"o2","customer":"Nordlys AS","region":"EMEA","status":"Paid","amount":10080,"qty":14},{"id":"o3","customer":"Brio SpA","region":"EMEA","status":"Paid","amount":9000,"qty":10},{"id":"o4","customer":"Kaspar and Co","region":"EMEA","status":"Pending","amount":9450,"qty":12},{"id":"o5","customer":"Ljus AB","region":"EMEA","status":"Pending","amount":7280,"qty":9},{"id":"o6","customer":"Halcyon Inc","region":"Americas","status":"Paid","amount":14200,"qty":18},{"id":"o7","customer":"Pampa SA","region":"Americas","status":"Failed","amount":4100,"qty":5},{"id":"o8","customer":"Maple Ltd","region":"Americas","status":"Paid","amount":11600,"qty":13},{"id":"o9","customer":"Tundra Co","region":"Americas","status":"Pending","amount":7000,"qty":8},{"id":"o10","customer":"Kiwi Ltd","region":"APAC","status":"Paid","amount":8340,"qty":11},{"id":"o11","customer":"Sakura KK","region":"APAC","status":"Paid","amount":7600,"qty":10},{"id":"o12","customer":"Lotus Pte","region":"APAC","status":"Pending","amount":5400,"qty":8}]'>
<c2-table-column field="customer" header="Customer" width="minmax(180px, 2fr)" summary-label="Total"></c2-table-column>
<c2-table-column field="region" header="Region" hidden></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="amount" header="Amount" width="130px" align="end" format="currency" summary="sum"></c2-table-column>
<c2-table-column field="qty" header="Qty" width="80px" align="end" format="number" summary="sum"></c2-table-column>
</c2-table><style>
.grouped-bands {
height: 360px;
width: 100%;
--c2-table__group-band--background: var(--c2-theme--color-surface-container, #f4f4f5);
--c2-table__group-count--background: var(--c2-theme--color-surface, #ffffff);
}
</style>
<c2-table client:only="lit" class="grouped-bands" row-key="id" group-by="status" group-display="band" rows='[{"id":"o1","customer":"Acme GmbH","region":"EMEA","status":"Paid","amount":12400,"qty":16},{"id":"o2","customer":"Nordlys AS","region":"EMEA","status":"Paid","amount":10080,"qty":14},{"id":"o3","customer":"Brio SpA","region":"EMEA","status":"Paid","amount":9000,"qty":10},{"id":"o4","customer":"Kaspar and Co","region":"EMEA","status":"Pending","amount":9450,"qty":12},{"id":"o5","customer":"Ljus AB","region":"EMEA","status":"Pending","amount":7280,"qty":9},{"id":"o6","customer":"Halcyon Inc","region":"Americas","status":"Paid","amount":14200,"qty":18},{"id":"o7","customer":"Pampa SA","region":"Americas","status":"Failed","amount":4100,"qty":5},{"id":"o8","customer":"Maple Ltd","region":"Americas","status":"Paid","amount":11600,"qty":13},{"id":"o9","customer":"Tundra Co","region":"Americas","status":"Pending","amount":7000,"qty":8},{"id":"o10","customer":"Kiwi Ltd","region":"APAC","status":"Paid","amount":8340,"qty":11},{"id":"o11","customer":"Sakura KK","region":"APAC","status":"Paid","amount":7600,"qty":10},{"id":"o12","customer":"Lotus Pte","region":"APAC","status":"Pending","amount":5400,"qty":8}]'>
<c2-table-column field="customer" header="Customer" width="minmax(180px, 2fr)"></c2-table-column>
<c2-table-column field="region" header="Region" width="110px"></c2-table-column>
<c2-table-column field="status" header="Status" hidden></c2-table-column>
<c2-table-column field="amount" header="Amount" width="130px" align="end" format="currency"></c2-table-column>
<c2-table-column field="qty" header="Qty" width="80px" align="end" format="number"></c2-table-column>
</c2-table><style>
.grouped-collapsed {
height: 240px;
width: 100%;
--c2-table__group-row--background: var(--c2-theme--color-surface, #ffffff);
--c2-table__group-toggle--color: rgb(2, 101, 220);
}
</style>
<c2-table client:only="lit" class="grouped-collapsed" row-key="id" group-by="region" groups-collapsed rows='[{"id":"o1","customer":"Acme GmbH","region":"EMEA","status":"Paid","amount":12400,"qty":16},{"id":"o2","customer":"Nordlys AS","region":"EMEA","status":"Paid","amount":10080,"qty":14},{"id":"o3","customer":"Brio SpA","region":"EMEA","status":"Paid","amount":9000,"qty":10},{"id":"o4","customer":"Kaspar and Co","region":"EMEA","status":"Pending","amount":9450,"qty":12},{"id":"o5","customer":"Ljus AB","region":"EMEA","status":"Pending","amount":7280,"qty":9},{"id":"o6","customer":"Halcyon Inc","region":"Americas","status":"Paid","amount":14200,"qty":18},{"id":"o7","customer":"Pampa SA","region":"Americas","status":"Failed","amount":4100,"qty":5},{"id":"o8","customer":"Maple Ltd","region":"Americas","status":"Paid","amount":11600,"qty":13},{"id":"o9","customer":"Tundra Co","region":"Americas","status":"Pending","amount":7000,"qty":8},{"id":"o10","customer":"Kiwi Ltd","region":"APAC","status":"Paid","amount":8340,"qty":11},{"id":"o11","customer":"Sakura KK","region":"APAC","status":"Paid","amount":7600,"qty":10},{"id":"o12","customer":"Lotus Pte","region":"APAC","status":"Pending","amount":5400,"qty":8}]'>
<c2-table-column field="customer" header="Customer" width="minmax(180px, 2fr)" summary-label="Total"></c2-table-column>
<c2-table-column field="region" header="Region" hidden></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="amount" header="Amount" width="130px" align="end" format="currency" summary="sum"></c2-table-column>
<c2-table-column field="qty" header="Qty" width="80px" align="end" format="number" summary="sum"></c2-table-column>
</c2-table><style>
.grouped-toolbar {
height: 400px;
width: 100%;
--c2-table__toolbar--padding: 8px 12px;
}
.grouped-toolbar .bar {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
font-size: 12px;
color: color-mix(in srgb, var(--c2-theme--color-on-surface, #18181b) 72%, var(--c2-theme--color-surface, #ffffff));
--c2-button-group__segmented-item--color: var(--c2-theme--color-on-surface, #18181b);
}
</style>
<c2-table client:only="lit" class="grouped-toolbar" data-group-by-table row-key="id" group-by="region" rows='[{"id":"o1","customer":"Acme GmbH","region":"EMEA","status":"Paid","amount":12400,"qty":16},{"id":"o2","customer":"Nordlys AS","region":"EMEA","status":"Paid","amount":10080,"qty":14},{"id":"o3","customer":"Brio SpA","region":"EMEA","status":"Paid","amount":9000,"qty":10},{"id":"o4","customer":"Kaspar and Co","region":"EMEA","status":"Pending","amount":9450,"qty":12},{"id":"o5","customer":"Ljus AB","region":"EMEA","status":"Pending","amount":7280,"qty":9},{"id":"o6","customer":"Halcyon Inc","region":"Americas","status":"Paid","amount":14200,"qty":18},{"id":"o7","customer":"Pampa SA","region":"Americas","status":"Failed","amount":4100,"qty":5},{"id":"o8","customer":"Maple Ltd","region":"Americas","status":"Paid","amount":11600,"qty":13},{"id":"o9","customer":"Tundra Co","region":"Americas","status":"Pending","amount":7000,"qty":8},{"id":"o10","customer":"Kiwi Ltd","region":"APAC","status":"Paid","amount":8340,"qty":11},{"id":"o11","customer":"Sakura KK","region":"APAC","status":"Paid","amount":7600,"qty":10},{"id":"o12","customer":"Lotus Pte","region":"APAC","status":"Pending","amount":5400,"qty":8}]'>
<div class="bar" slot="toolbar">
<span>Group by</span>
<c2-button-group appearance="segmented" selection="single" size="s" value="region" aria-label="Group by">
<c2-button value="none">None</c2-button>
<c2-button value="region">Region</c2-button>
<c2-button value="status">Status</c2-button>
<c2-button value="region,status">Region › Status</c2-button>
</c2-button-group>
</div>
<c2-table-column field="customer" header="Customer" width="minmax(180px, 2fr)" summary-label="Total"></c2-table-column>
<c2-table-column field="region" header="Region" hidden></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="amount" header="Amount" width="130px" align="end" format="currency" summary="sum"></c2-table-column>
<c2-table-column field="qty" header="Qty" width="80px" align="end" format="number" summary="sum"></c2-table-column>
</c2-table>States
loading shows a spinner until the data lands — or whatever you slot into loading — error replaces the body with a message and a way out, and an empty rows array shows empty-message or the empty slot. Give the host a height and the body scrolls inside it; past virtual-threshold rows it virtualizes on its own.
<style>
.loading-card {
height: 296px;
width: 100%;
--c2-table__skeleton--background: var(--c2-theme--color-surface-container, #f4f4f5);
--c2-table__skeleton--border-radius: 4px;
}
</style>
<c2-table client:only="lit" class="loading-card" loading row-key="id" rows='[]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.skeleton-card {
height: 296px;
width: 100%;
--c2-table__state--padding: 0;
}
.skeleton-card .rows {
display: grid;
gap: 12px;
width: 100%;
padding: 18px 16px;
}
.skeleton-card .line {
height: 10px;
border-radius: 4px;
background: linear-gradient(90deg, var(--c2-theme--color-surface-container, #f4f4f5) 0%, var(--c2-theme--color-outline-variant, #e4e4e7) 50%, var(--c2-theme--color-surface-container, #f4f4f5) 100%);
}
.skeleton-card .line:nth-child(2) {
width: 82%;
}
.skeleton-card .line:nth-child(3) {
width: 91%;
}
.skeleton-card .line:nth-child(4) {
width: 74%;
}
</style>
<c2-table client:only="lit" class="skeleton-card" loading row-key="id" rows='[]'>
<div class="rows" slot="loading">
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
</div>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.empty-card {
height: 296px;
width: 100%;
--c2-table__state--color: var(--c2-theme--color-on-surface-variant, #71717a);
--c2-table__state--padding: 40px 16px;
}
.empty-card .empty {
display: grid;
gap: 4px;
justify-items: center;
}
.empty-card .empty strong {
font-size: 14px;
color: var(--c2-theme--color-on-surface, #18181b);
}
</style>
<c2-table client:only="lit" class="empty-card" row-key="id" rows='[]'>
<div class="empty" slot="empty">
<strong>No people match those filters</strong>
<span>Clear the search to see the whole team.</span>
<c2-button>Clear filters</c2-button>
</div>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.error-card {
height: 296px;
width: 100%;
--c2-table__state__error--color: var(--c2-theme--color-error, #dc2626);
--c2-table__state--padding: 32px 16px;
}
.error-card .failed {
display: grid;
gap: 8px;
justify-items: center;
}
</style>
<c2-table client:only="lit" class="error-card" error="The scorecard service did not answer." row-key="id" rows='[]'>
<div class="failed" slot="error">
<span>The scorecard service did not answer.</span>
<c2-button>
<c2-feather-rotate-ccw slot="prefix-icon"></c2-feather-rotate-ccw>
Retry
</c2-button>
</div>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.scrolling {
height: 240px;
width: 100%;
--c2-table__row--height: 36px;
}
</style>
<c2-table client:only="lit" class="scrolling" sortable row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"},{"id":"7","name":"Ada Lovelace II","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"8","name":"Grace Hopper II","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"9","name":"Alan Turing II","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"10","name":"Radia Perlman II","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"11","name":"Barbara Liskov II","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"12","name":"Katherine Johnson II","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table>Looks
Same data, different surface. The table is one CSS grid, so a look is only variables: --c2-table--* for the frame, --c2-table__header--* and --c2-table__header-cell--* for the head, --c2-table__row--* with its __odd, __hover and __selected states, and --c2-table__cell--* for the body. Each cell also carries a part named after its column — ::part(cell-pct) — so one column can be styled on its own.
<style>
.report {
height: 296px;
width: 100%;
--c2-table--border-top: none;
--c2-table--border-right: none;
--c2-table--border-bottom: none;
--c2-table--border-left: none;
--c2-table--border-top-left-radius: 0;
--c2-table--border-top-right-radius: 0;
--c2-table--border-bottom-left-radius: 0;
--c2-table--border-bottom-right-radius: 0;
--c2-table__header--background: transparent;
--c2-table__header--border-bottom: 1px solid var(--c2-theme--color-inverse-surface, #18181b);
--c2-table__header--color: var(--c2-theme--color-on-surface, #18181b);
--c2-table__header--letter-spacing: 0.08em;
--c2-table__header-cell--padding: 0 8px;
--c2-table__row--border-bottom: 1px solid var(--c2-theme--color-surface-container, #f4f4f5);
--c2-table__row__hover--background: var(--c2-theme--color-surface-container-low, #fafafa);
--c2-table__cell--padding: 0 8px;
}
</style>
<c2-table client:only="lit" class="report" sortable row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.sheet {
height: 296px;
width: 100%;
--c2-table--border-top-left-radius: 0;
--c2-table--border-top-right-radius: 0;
--c2-table--border-bottom-left-radius: 0;
--c2-table--border-bottom-right-radius: 0;
--c2-table__header--background: var(--c2-theme--color-surface-container, #f4f4f5);
--c2-table__header--height: 32px;
--c2-table__header--font-size: 12px;
--c2-table__header--border-bottom: 1px solid var(--c2-theme--color-outline, #d4d4d8);
--c2-table__row--height: 30px;
--c2-table__row--border-bottom: 1px solid var(--c2-theme--color-outline-variant, #e4e4e7);
--c2-table__cell--border-right: 1px solid var(--c2-theme--color-outline-variant, #e4e4e7);
--c2-table__cell--padding: 0 8px;
--c2-table__cell--font-size: 12px;
--c2-table__header-cell--padding: 0 8px;
}
</style>
<c2-table client:only="lit" class="sheet" sortable resizable row-key="id" rows='[{"id":"1","order":"#10841","customer":"Northwind Trading","channel":"Online","items":12,"total":8420.5,"margin":0.182,"status":"Paid","placed":"2026-02-11T09:24:00Z"},{"id":"2","order":"#10840","customer":"Contoso Ltd","channel":"Partner","items":4,"total":1290,"margin":0.241,"status":"Pending","placed":"2026-02-11T08:02:00Z"},{"id":"3","order":"#10839","customer":"Fabrikam","channel":"Online","items":31,"total":18640.75,"margin":0.129,"status":"Paid","placed":"2026-02-10T17:41:00Z"},{"id":"4","order":"#10838","customer":"Tailspin Toys","channel":"Retail","items":7,"total":3150.2,"margin":0.204,"status":"Refunded","placed":"2026-02-10T14:15:00Z"},{"id":"5","order":"#10837","customer":"Adventure Works","channel":"Partner","items":19,"total":9875,"margin":0.163,"status":"Paid","placed":"2026-02-09T11:58:00Z"},{"id":"6","order":"#10836","customer":"Wide World Importers","channel":"Online","items":2,"total":480.9,"margin":0.315,"status":"Pending","placed":"2026-02-09T10:07:00Z"}]'>
<c2-table-column field="order" header="Order" width="100px"></c2-table-column>
<c2-table-column field="customer" header="Customer" width="minmax(150px, 2fr)"></c2-table-column>
<c2-table-column field="channel" header="Channel" width="1fr"></c2-table-column>
<c2-table-column field="items" header="Items" width="80px" align="end" format="number"></c2-table-column>
<c2-table-column field="total" header="Total" width="120px" align="end" format="currency"></c2-table-column>
<c2-table-column field="margin" header="Margin" width="90px" align="end" format="percent"></c2-table-column>
<c2-table-column field="status" header="Status" width="100px" align="center"></c2-table-column>
</c2-table><style>
.soft {
height: 310px;
width: 100%;
--c2-table--background: var(--c2-theme--color-surface-container-low, #fafafa);
--c2-table--border-top: none;
--c2-table--border-right: none;
--c2-table--border-bottom: none;
--c2-table--border-left: none;
--c2-table--border-top-left-radius: 14px;
--c2-table--border-top-right-radius: 14px;
--c2-table--border-bottom-left-radius: 14px;
--c2-table--border-bottom-right-radius: 14px;
--c2-table--box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.08);
--c2-table__header--background: var(--c2-theme--color-surface-container-low, #fafafa);
--c2-table__header--border-bottom: none;
--c2-table__header--height: 40px;
--c2-table__row--height: 44px;
--c2-table__row--border-bottom: none;
--c2-table__row__odd--background: var(--c2-theme--color-surface, #ffffff);
--c2-table__row__hover--background: var(--c2-theme--color-surface-container, #f4f4f5);
--c2-table__cell--padding: 0 16px;
--c2-table__header-cell--padding: 0 16px;
}
</style>
<c2-table client:only="lit" class="soft" stripe sortable row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.zebra {
height: 296px;
width: 100%;
--c2-table__row--border-bottom: none;
--c2-table__row__odd--background: var(--c2-theme--color-surface-container, #f4f4f5);
--c2-table__row__hover--background: var(--c2-theme--color-outline-variant, #e4e4e7);
--c2-table__header--background: var(--c2-theme--color-surface, #ffffff);
--c2-table__header--border-bottom: 2px solid var(--c2-theme--color-inverse-surface, #18181b);
}
</style>
<c2-table client:only="lit" class="zebra" stripe sortable row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.compact {
height: 244px;
width: 100%;
--c2-table--font-size: 12px;
--c2-table__header--height: 28px;
--c2-table__header--font-size: 11px;
--c2-table__row--height: 28px;
--c2-table__cell--font-size: 12px;
--c2-table__cell--padding: 0 8px;
--c2-table__header-cell--padding: 0 8px;
}
</style>
<c2-table client:only="lit" class="compact" sortable row-key="id" rows='[{"id":"1","name":"Ada Lovelace","team":"Analytics","role":"Principal","score":128000,"status":"Active","updated":"2026-02-11"},{"id":"2","name":"Grace Hopper","team":"Compilers","role":"Staff","score":96500,"status":"Active","updated":"2026-02-09"},{"id":"3","name":"Alan Turing","team":"Research","role":"Principal","score":87200,"status":"On leave","updated":"2026-01-28"},{"id":"4","name":"Radia Perlman","team":"Networks","role":"Staff","score":74800,"status":"Active","updated":"2026-02-10"},{"id":"5","name":"Barbara Liskov","team":"Research","role":"Distinguished","score":69100,"status":"Active","updated":"2026-02-05"},{"id":"6","name":"Katherine Johnson","team":"Flight","role":"Senior","score":58400,"status":"Archived","updated":"2026-01-19"}]'>
<c2-table-column field="name" header="Name" width="minmax(160px, 2fr)"></c2-table-column>
<c2-table-column field="team" header="Team" width="1fr"></c2-table-column>
<c2-table-column field="role" header="Role" width="1fr"></c2-table-column>
<c2-table-column field="status" header="Status" width="110px"></c2-table-column>
<c2-table-column field="score" header="Score" width="110px" align="end" format="number"></c2-table-column>
<c2-table-column field="updated" header="Updated" width="120px" align="end" format="date"></c2-table-column>
</c2-table><style>
.financial {
height: 296px;
width: 100%;
--c2-table--font-size: 13px;
--c2-table__header--background: var(--c2-theme--color-surface, #ffffff);
--c2-table__header--border-bottom: 1px solid var(--c2-theme--color-outline-variant, #e4e4e7);
--c2-table__row--height: 36px;
--c2-table__row--border-bottom: 1px solid color-mix(in srgb, var(--c2-theme--color-on-surface, #18181b) 4%, var(--c2-theme--color-surface, #ffffff));
--c2-table__row__selected--background: color-mix(in srgb, #f59e0b 10%, var(--c2-theme--color-surface, #ffffff));
--c2-table__cell--font-size: 13px;
}
.financial::part(cell-last), .financial::part(cell-change), .financial::part(cell-pct), .financial::part(cell-volume), .financial::part(cell-cap) {
font-variant-numeric: tabular-nums;
}
.financial::part(cell-change), .financial::part(cell-pct) {
color: color-mix(in srgb, #16a34a 70%, var(--c2-theme--color-on-surface, #18181b));
font-weight: 600;
}
.financial::part(row-selected) {
box-shadow: inset 2px 0 0 0 #f59e0b;
}
</style>
<c2-table client:only="lit" class="financial" sortable sort="pct:desc" selection="multiple" value="3" row-key="id" rows='[{"id":"1","symbol":"ACME","name":"Acme Industrial","last":184.32,"change":2.41,"pct":0.0132,"volume":4820000,"cap":128400000000},{"id":"2","symbol":"NWND","name":"Northwind Energy","last":62.18,"change":-1.07,"pct":-0.0169,"volume":9120000,"cap":48200000000},{"id":"3","symbol":"CNTS","name":"Contoso Systems","last":311.94,"change":7.86,"pct":0.0259,"volume":2310000,"cap":264900000000},{"id":"4","symbol":"FBRK","name":"Fabrikam Materials","last":27.45,"change":-0.62,"pct":-0.0221,"volume":15840000,"cap":8900000000},{"id":"5","symbol":"TSPN","name":"Tailspin Aviation","last":95.7,"change":0.18,"pct":0.0019,"volume":1260000,"cap":19400000000},{"id":"6","symbol":"ADVW","name":"Adventure Works","last":143.06,"change":-3.24,"pct":-0.0221,"volume":3470000,"cap":52700000000}]'>
<c2-table-column field="symbol" header="Symbol" width="90px"></c2-table-column>
<c2-table-column field="name" header="Name" width="minmax(150px, 2fr)"></c2-table-column>
<c2-table-column field="last" header="Last" width="100px" align="end" format="number" format-options='{"minimumFractionDigits":2}'></c2-table-column>
<c2-table-column field="change" header="Change" width="100px" align="end" format="number" format-options='{"minimumFractionDigits":2,"signDisplay":"always"}'></c2-table-column>
<c2-table-column field="pct" header="%" width="90px" align="end" format="percent" format-options='{"minimumFractionDigits":2,"signDisplay":"always"}'></c2-table-column>
<c2-table-column field="volume" header="Volume" width="110px" align="end" format="number" format-options='{"notation":"compact"}'></c2-table-column>
<c2-table-column field="cap" header="Market cap" width="120px" align="end" format="currency" format-options='{"notation":"compact"}'></c2-table-column>
</c2-table>