Skip to content
Slotted

Data grid

An interactive grid for large record sets, driven by column definitions, with keyboard navigation between cells, sorting, filtering, search, selection, cell editing, grouping, trees and virtualized rows.

Order
Customer
Warehouse
Status
Placed
Total
SO-10421
Alfreds Futterkiste
Reno
Processing
Sep 1, 2026
$140.00
SO-10422
Island Trading
Columbus
Delivered
Sep 2, 2026
$873.00
SO-10423
Ernst Handel
Savannah
On hold
Sep 3, 2026
$1,606.00
SO-10424
Wartian Herkku
Reno
Shipped
Sep 4, 2026
$2,339.00
SO-10425
Hanari Carnes
Columbus
Processing
Sep 5, 2026
$3,072.00
SO-10426
Bon app'
Savannah
Delivered
Sep 6, 2026
$3,805.00
SO-10427
QUICK-Stop
Reno
On hold
Sep 7, 2026
$438.00
SO-10428
Folk och fä HB
Columbus
Shipped
Sep 8, 2026
$1,171.00
SO-10429
Alfreds Futterkiste
Savannah
Processing
Sep 9, 2026
$1,904.00
SO-10430
Island Trading
Reno
Delivered
Sep 10, 2026
$2,637.00
SO-10431
Ernst Handel
Columbus
On hold
Sep 11, 2026
$3,370.00
SO-10432
Wartian Herkku
Savannah
Shipped
Sep 12, 2026
$4,103.00
SO-10433
Hanari Carnes
Reno
Processing
Sep 13, 2026
$736.00
SO-10434
Bon app'
Columbus
Delivered
Sep 14, 2026
$1,469.00
SO-10435
QUICK-Stop
Savannah
On hold
Sep 15, 2026
$2,202.00
SO-10436
Folk och fä HB
Reno
Shipped
Sep 16, 2026
$2,935.00
SO-10437
Alfreds Futterkiste
Columbus
Processing
Sep 17, 2026
$3,668.00
SO-10438
Island Trading
Savannah
Delivered
Sep 18, 2026
$301.00
SO-10439
Ernst Handel
Reno
On hold
Sep 19, 2026
$1,034.00
SO-10440
Wartian Herkku
Columbus
Shipped
Sep 20, 2026
$1,767.00
SO-10441
Hanari Carnes
Savannah
Processing
Sep 21, 2026
$2,500.00
SO-10442
Bon app'
Reno
Delivered
Sep 22, 2026
$3,233.00
SO-10443
QUICK-Stop
Columbus
On hold
Sep 23, 2026
$3,966.00
SO-10444
Folk och fä HB
Savannah
Shipped
Sep 24, 2026
$599.00

Installation

The packages are a 0.x beta on npm, and their public API changes between beta releases without deprecation. One line installs the binding and the default theme.

bash
pnpm add @slotted/react @slotted/theme @slotted/themes
tsx
import { DataGrid, DataGridDefaultsProvider,  type DataGridColumn } from '@slotted/react';import type { GridColumn,  GridQuery,  GridColumnState } from '@slotted/core/grid';import { applyQuery,  emptyQuery, toGridParams, fromGridParams } from '@slotted/core/grid';

Data grid or table

A data grid is one composite widget: Tab enters it on one cell, and the arrow keys move between cells, rows and the header. It applies the sort, the filter and the search itself, and it mounts only the rows in view. Use it for working sets a reader navigates, edits or selects in. Use the table when the content is a document: a report, a short listing, a summary inside a page, where each control is its own Tab stop.

Columns

columns is a list of GridColumn definitions from @slotted/core/grid, the same object in React and Angular. accessor reads the value from the row, format turns it into the text a cell shows, and kind (text, number, date, datetime, boolean, set) decides how the column sorts, filters and edits. width fixes a column, flex shares the space left over, and rowHeader marks the column that names each row.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
SH-3301
Wartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53
SH-3302
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3303
Folk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3304
Ernst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3306
Ernst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3307
Wartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12

Column groups

columnGroups draws a header row above the column headers, with one cell spanning each group of columns. A group names its columns by id.

Shipment
Transport
Charges
Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
SH-3301
Wartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53
SH-3302
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3303
Folk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3304
Ernst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3306
Ernst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3307
Wartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12

Sorting

Press a header to sort by that column; press again to reverse it and a third time to clear it. Shift+Enter on a header adds the column to the sort order instead of replacing it. The sort is part of the query: query with onQueryChange ([(query)] in Angular) holds sort, filter, search, grouping and paging as one object.

Sorted by: carrier ascending, cost descending
Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
SH-3306
Ernst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3302
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3309
Wartian Herkku
Graz, AT
FedEx
Delayed
Sep 24, 2026
667.7 kg
$2,344.20
SH-3312
Ernst Handel
Graz, AT
UPS
Customs
Sep 6, 2026
375.6 kg
$1,516.14
SH-3307
Wartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3310
Wartian Herkku
Graz, AT
USPS
In transit
Sep 8, 2026
707.1 kg
$3,428.77
SH-3304
Ernst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3303
Folk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3311
Alfreds Futterkiste
Graz, AT
USPS
Customs
Sep 6, 2026
187.9 kg
$662.88
SH-3301
Wartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53

Filter row

filterRow adds a row of operands under the headers, one per column, with the control its kind calls for: a text field, a number field, a date picker, a yes-or-no select or a multi-select of the column’s options. withColumnFilter from @slotted/core/grid builds a query with a filter already applied.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
DelayedCustoms
mm
dd
yyyy
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12
SH-3309
Wartian Herkku
Graz, AT
FedEx
Delayed
Sep 24, 2026
667.7 kg
$2,344.20
SH-3311
Alfreds Futterkiste
Graz, AT
USPS
Customs
Sep 6, 2026
187.9 kg
$662.88
SH-3312
Ernst Handel
Graz, AT
UPS
Customs
Sep 6, 2026
375.6 kg
$1,516.14
SH-3314
QUICK-Stop
Marseille, FR
DHL
Delayed
Sep 3, 2026
775.3 kg
$3,277.45
SH-3316
QUICK-Stop
Boise, US
USPS
Customs
Sep 1, 2026
253.7 kg
$1,179.97
SH-3317
Bon app'
Oulu, FI
USPS
Delayed
Sep 16, 2026
882.5 kg
$2,749.66
SH-3319
Hanari Carnes
Rio de Janeiro, BR
FedEx
Delayed
Sep 2, 2026
170.1 kg
$685.65
SH-3321
Bon app'
Boise, US
FedEx
Delayed
Sep 13, 2026
528.1 kg
$1,482.65
SH-3322
Ernst Handel
Berlin, DE
USPS
Delayed
Sep 17, 2026
613.9 kg
$2,633.57

The query’s search matches every column marked searchable, which is every column by default in client mode. Put the search field outside the grid and write its text into the query with withSearch.

Selecting rows

selectionMode="multiple" draws a checkbox column. Shift+Space toggles the current row, Shift extends from the anchor row, and Ctrl+A selects every row the query left. Keys in disabledKeys cannot be selected, and their rows take the disabled ink. isRowSelectable keeps a row out of the selection and leaves the rest of it as it is: it is read, opened and edited like its neighbours. isRowMuted draws a row that is no longer active in the muted ink and keeps it selectable. value with onValueChange ([(value)] in Angular) holds the selected row keys. footer (slDataGridFooter in Angular) adds a bar under the grid.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
SH-3301
Wartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53
SH-3302
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3303
Folk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3304
Ernst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3306
Ernst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3307
Wartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12
SH-3309
Wartian Herkku
Graz, AT
FedEx
Delayed
Sep 24, 2026
667.7 kg
$2,344.20
SH-3310
Wartian Herkku
Graz, AT
USPS
In transit
Sep 8, 2026
707.1 kg
$3,428.77
SH-3311
Alfreds Futterkiste
Graz, AT
USPS
Customs
Sep 6, 2026
187.9 kg
$662.88
SH-3312
Ernst Handel
Graz, AT
UPS
Customs
Sep 6, 2026
375.6 kg
$1,516.14
2 selected

Selecting a range

selectionMode="range" selects a rectangle of cells, the way a spreadsheet does: Shift and the arrow keys extend it from the anchor, a pointer drag sets it, and Ctrl+C copies it as tab-separated text that pastes into a spreadsheet.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
SH-3301
Wartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53
SH-3302
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3303
Folk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3304
Ernst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3306
Ernst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3307
Wartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12
SH-3309
Wartian Herkku
Graz, AT
FedEx
Delayed
Sep 24, 2026
667.7 kg
$2,344.20
SH-3310
Wartian Herkku
Graz, AT
USPS
In transit
Sep 8, 2026
707.1 kg
$3,428.77
SH-3311
Alfreds Futterkiste
Graz, AT
USPS
Customs
Sep 6, 2026
187.9 kg
$662.88
SH-3312
Ernst Handel
Graz, AT
UPS
Customs
Sep 6, 2026
375.6 kg
$1,516.14

Editing cells

A column with editable: true opens an editor on Enter, F2, a double press, or a typed character. Enter commits and moves one row down, Tab commits and moves to the next editable cell, Escape cancels. validate returns the message shown while a draft is invalid. The grid does not change your rows: onEditCommit ((editCommit) in Angular) reports the row key and the changed values, and you write them back.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
SH-3301
Wartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53
SH-3302
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3303
Folk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3304
Ernst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3306
Ernst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3307
Wartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12

Editing rows

editMode="row" opens every editable cell of the row at once, with Save and Cancel in an actions column. Tab moves between the row’s editors, Enter commits the row and Escape cancels it, for records whose fields are checked as a whole.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
SH-3301
Wartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53
SH-3302
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3303
Folk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3304
Ernst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3306
Ernst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3307
Wartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12

Pinning, resizing and reordering

defaultColumnState sets where columns start: pinned.start and pinned.end keep columns in view while the others scroll, and widths sets starting widths. Columns resize by dragging the edge of the header, or with Ctrl+Shift+ArrowLeft and Ctrl+Shift+ArrowRight on a header, and reorder by dragging the header, or with Alt+ArrowLeft and Alt+ArrowRight. columnState with onColumnStateChange holds the result.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
SH-3301
Wartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53
SH-3302
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3303
Folk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3304
Ernst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3306
Ernst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3307
Wartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12
SH-3309
Wartian Herkku
Graz, AT
FedEx
Delayed
Sep 24, 2026
667.7 kg
$2,344.20
SH-3310
Wartian Herkku
Graz, AT
USPS
In transit
Sep 8, 2026
707.1 kg
$3,428.77
SH-3311
Alfreds Futterkiste
Graz, AT
USPS
Customs
Sep 6, 2026
187.9 kg
$662.88
SH-3312
Ernst Handel
Graz, AT
UPS
Customs
Sep 6, 2026
375.6 kg
$1,516.14

Grouping

group in the query lists the columns rows are grouped by, one level per column. Each group row shows its value and how many rows it holds, and groups start open; ArrowLeft closes a group and ArrowRight opens it. A column with an aggregate also shows its total on each group row.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
USPS8 rows
SH-3301
Wartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53
SH-3303
Folk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3304
Ernst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3310
Wartian Herkku
Graz, AT
USPS
In transit
Sep 8, 2026
707.1 kg
$3,428.77
SH-3311
Alfreds Futterkiste
Graz, AT
USPS
Customs
Sep 6, 2026
187.9 kg
$662.88
SH-3316
QUICK-Stop
Boise, US
USPS
Customs
Sep 1, 2026
253.7 kg
$1,179.97
SH-3317
Bon app'
Oulu, FI
USPS
Delayed
Sep 16, 2026
882.5 kg
$2,749.66
SH-3318
Alfreds Futterkiste
Marseille, FR
USPS
In transit
Sep 11, 2026
24.2 kg
$84.07
DHL5 rows
SH-3302
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3306
Ernst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3314
QUICK-Stop
Marseille, FR
DHL
Delayed
Sep 3, 2026
775.3 kg
$3,277.45
SH-3315
QUICK-Stop
Berlin, DE
DHL
Delivered
Sep 28, 2026
506.5 kg
$2,397.47
SH-3320
Bon app'
Cowes, UK
DHL
Delivered
Sep 4, 2026
397.8 kg
$1,884.10
UPS4 rows
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3307
Wartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12
SH-3312
Ernst Handel
Graz, AT
UPS
Customs
Sep 6, 2026
375.6 kg
$1,516.14
FedEx3 rows
SH-3309
Wartian Herkku
Graz, AT
FedEx
Delayed
Sep 24, 2026
667.7 kg
$2,344.20
SH-3313
Ernst Handel
Rio de Janeiro, BR
FedEx
In transit
Sep 11, 2026
396.3 kg
$1,346.51
SH-3319
Hanari Carnes
Rio de Janeiro, BR
FedEx
Delayed
Sep 2, 2026
170.1 kg
$685.65

Totals

aggregate on a column (sum, avg, min, max, count, or a function of the values) adds a summary row with that column’s total over the rows the query left.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
SH-3301
Wartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53
SH-3302
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3303
Folk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3304
Ernst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3306
Ernst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3307
Wartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12
SH-3309
Wartian Herkku
Graz, AT
FedEx
Delayed
Sep 24, 2026
667.7 kg
$2,344.20
SH-3310
Wartian Herkku
Graz, AT
USPS
In transit
Sep 8, 2026
707.1 kg
$3,428.77
4023.1 kg
$14,221.00

Row details

renderDetail (an slDataGridDetail template in Angular) adds an expander to each row and draws the detail under it. defaultExpanded opens rows on the first render.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
SH-3301
Wartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53
USPS picked up 214.9 kg on 2026-09-24 for Rio de Janeiro, BR. Charged $662.53.
SH-3302
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3303
Folk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3304
Ernst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3306
Ernst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3307
Wartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12

Trees

tree with a parentKey function turns flat rows into a hierarchy: each row with children gets an expander in its first column, and the levels indent under it. onLoadChildren with hasChildren loads a level when it is first opened.

Location
Type
Units on hand
Reno, NV
Warehouse
4,210
Zone A — dry goods
Zone
2,630
Aisle 01
Aisle
1,410
Aisle 02
Aisle
1,220
Zone B — chilled
Zone
1,580

Ten thousand rows

The grid mounts only the rows and columns in view, so a set of ten thousand rows scrolls the same as a set of twenty. Sorting, filtering and selection cover every row, mounted or not.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
SH-3301
Wartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53
SH-3302
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3303
Folk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3304
Ernst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3306
Ernst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3307
Wartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12
SH-3309
Wartian Herkku
Graz, AT
FedEx
Delayed
Sep 24, 2026
667.7 kg
$2,344.20
SH-3310
Wartian Herkku
Graz, AT
USPS
In transit
Sep 8, 2026
707.1 kg
$3,428.77
SH-3311
Alfreds Futterkiste
Graz, AT
USPS
Customs
Sep 6, 2026
187.9 kg
$662.88
SH-3312
Ernst Handel
Graz, AT
UPS
Customs
Sep 6, 2026
375.6 kg
$1,516.14
SH-3313
Ernst Handel
Rio de Janeiro, BR
FedEx
In transit
Sep 11, 2026
396.3 kg
$1,346.51
SH-3314
QUICK-Stop
Marseille, FR
DHL
Delayed
Sep 3, 2026
775.3 kg
$3,277.45
SH-3315
QUICK-Stop
Berlin, DE
DHL
Delivered
Sep 28, 2026
506.5 kg
$2,397.47
SH-3316
QUICK-Stop
Boise, US
USPS
Customs
Sep 1, 2026
253.7 kg
$1,179.97
SH-3317
Bon app'
Oulu, FI
USPS
Delayed
Sep 16, 2026
882.5 kg
$2,749.66
SH-3318
Alfreds Futterkiste
Marseille, FR
USPS
In transit
Sep 11, 2026
24.2 kg
$84.07
SH-3319
Hanari Carnes
Rio de Janeiro, BR
FedEx
Delayed
Sep 2, 2026
170.1 kg
$685.65
SH-3320
Bon app'
Cowes, UK
DHL
Delivered
Sep 4, 2026
397.8 kg
$1,884.10
SH-3321
Bon app'
Boise, US
FedEx
Delayed
Sep 13, 2026
528.1 kg
$1,482.65
SH-3322
Ernst Handel
Berlin, DE
USPS
Delayed
Sep 17, 2026
613.9 kg
$2,633.57
SH-3323
Bon app'
Oulu, FI
USPS
In transit
Sep 10, 2026
259.5 kg
$922.49
SH-3324
Wartian Herkku
Bräcke, SE
USPS
In transit
Sep 28, 2026
471.8 kg
$1,290.65

Empty

A grid with no rows shows a result state in place of the body. When a filter or a search left no rows, the message says so and offers to clear them.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
No rows

Load error

error replaces the body with the message, and onRetry ((retry) in Angular) adds a Try again button.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
The rows could not be loaded

The shipments service did not answer within 30 seconds.

Loading

loading with no rows draws skeleton rows as wide as the visible columns. Over rows already shown, it dims the body and sets aria-busy, and nothing moves.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost

Rich cells

cellRenderers (an slDataGridCell="<column id>" template in Angular) replaces what one column’s cells draw, with the row and the value in hand. The column keeps its sort, filter and search, which read the value rather than what the cell draws.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
SH-3301
WHWartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53
SH-3302
WHWartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3303
FHFolk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3304
EHErnst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3305
HCHanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3306
EHErnst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3307
WHWartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
FHFolk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12
SH-3309
WHWartian Herkku
Graz, AT
FedEx
Delayed
Sep 24, 2026
667.7 kg
$2,344.20
SH-3310
WHWartian Herkku
Graz, AT
USPS
In transit
Sep 8, 2026
707.1 kg
$3,428.77

Opening a row

activatable with onActivate ((activate) in Angular) reports a double press on a row, or Enter on its text cell, so a row can open its record.

Double-click a row, or press Enter on its shipment cell.
Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
SH-3301
Wartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53
SH-3302
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3303
Folk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3304
Ernst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3306
Ernst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3307
Wartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12
SH-3309
Wartian Herkku
Graz, AT
FedEx
Delayed
Sep 24, 2026
667.7 kg
$2,344.20
SH-3310
Wartian Herkku
Graz, AT
USPS
In transit
Sep 8, 2026
707.1 kg
$3,428.77
SH-3311
Alfreds Futterkiste
Graz, AT
USPS
Customs
Sep 6, 2026
187.9 kg
$662.88
SH-3312
Ernst Handel
Graz, AT
UPS
Customs
Sep 6, 2026
375.6 kg
$1,516.14

Recipe: shipments workspace

A search field writes into the query, the grid selects rows, and the footer holds the bulk action for the selection.

Shipment
Customer
Destination
Carrier
Status
Shipped
Weight
Cost
SH-3301
Wartian Herkku
Rio de Janeiro, BR
USPS
In transit
Sep 24, 2026
214.9 kg
$662.53
SH-3302
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 16, 2026
61.9 kg
$236.16
SH-3303
Folk och fä HB
Bräcke, SE
USPS
Delivered
Sep 14, 2026
701.8 kg
$1,597.17
SH-3304
Ernst Handel
Marseille, FR
USPS
In transit
Sep 13, 2026
750.8 kg
$2,529.42
SH-3305
Hanari Carnes
Boise, US
UPS
Delayed
Sep 26, 2026
102.6 kg
$286.99
SH-3306
Ernst Handel
Rio de Janeiro, BR
DHL
Delivered
Sep 5, 2026
317.5 kg
$1,467.62
SH-3307
Wartian Herkku
Bräcke, SE
UPS
Delivered
Sep 26, 2026
341.4 kg
$1,285.02
SH-3308
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 22, 2026
157.4 kg
$383.12
SH-3309
Wartian Herkku
Graz, AT
FedEx
Delayed
Sep 24, 2026
667.7 kg
$2,344.20
SH-3310
Wartian Herkku
Graz, AT
USPS
In transit
Sep 8, 2026
707.1 kg
$3,428.77
SH-3311
Alfreds Futterkiste
Graz, AT
USPS
Customs
Sep 6, 2026
187.9 kg
$662.88
SH-3312
Ernst Handel
Graz, AT
UPS
Customs
Sep 6, 2026
375.6 kg
$1,516.14
SH-3313
Ernst Handel
Rio de Janeiro, BR
FedEx
In transit
Sep 11, 2026
396.3 kg
$1,346.51
SH-3314
QUICK-Stop
Marseille, FR
DHL
Delayed
Sep 3, 2026
775.3 kg
$3,277.45
SH-3315
QUICK-Stop
Berlin, DE
DHL
Delivered
Sep 28, 2026
506.5 kg
$2,397.47
SH-3316
QUICK-Stop
Boise, US
USPS
Customs
Sep 1, 2026
253.7 kg
$1,179.97
SH-3317
Bon app'
Oulu, FI
USPS
Delayed
Sep 16, 2026
882.5 kg
$2,749.66
SH-3318
Alfreds Futterkiste
Marseille, FR
USPS
In transit
Sep 11, 2026
24.2 kg
$84.07
SH-3319
Hanari Carnes
Rio de Janeiro, BR
FedEx
Delayed
Sep 2, 2026
170.1 kg
$685.65
SH-3320
Bon app'
Cowes, UK
DHL
Delivered
Sep 4, 2026
397.8 kg
$1,884.10
SH-3321
Bon app'
Boise, US
FedEx
Delayed
Sep 13, 2026
528.1 kg
$1,482.65
SH-3322
Ernst Handel
Berlin, DE
USPS
Delayed
Sep 17, 2026
613.9 kg
$2,633.57
SH-3323
Bon app'
Oulu, FI
USPS
In transit
Sep 10, 2026
259.5 kg
$922.49
SH-3324
Wartian Herkku
Bräcke, SE
USPS
In transit
Sep 28, 2026
471.8 kg
$1,290.65
SH-3325
Bon app'
Marseille, FR
USPS
In transit
Sep 10, 2026
842.7 kg
$1,769.51
SH-3326
Island Trading
Oulu, FI
FedEx
In transit
Sep 25, 2026
162.1 kg
$544.76
SH-3327
Island Trading
Graz, AT
FedEx
Delayed
Sep 25, 2026
463.0 kg
$2,280.04
SH-3328
Alfreds Futterkiste
Marseille, FR
USPS
Delayed
Sep 23, 2026
97.5 kg
$397.46
SH-3329
Island Trading
Marseille, FR
UPS
Customs
Sep 16, 2026
143.7 kg
$446.02
SH-3330
Hanari Carnes
Berlin, DE
FedEx
Customs
Sep 26, 2026
744.5 kg
$3,243.04
SH-3331
Alfreds Futterkiste
Oulu, FI
UPS
Delayed
Sep 25, 2026
877.2 kg
$2,844.81
SH-3332
QUICK-Stop
Bräcke, SE
FedEx
Delivered
Sep 11, 2026
654.4 kg
$2,075.14
SH-3333
Folk och fä HB
Berlin, DE
DHL
Delivered
Sep 19, 2026
756.5 kg
$3,340.07
SH-3334
QUICK-Stop
Bräcke, SE
FedEx
Delivered
Sep 3, 2026
794.6 kg
$2,328.27
SH-3335
Island Trading
Berlin, DE
USPS
Customs
Sep 20, 2026
206.2 kg
$432.69
SH-3336
Bon app'
Boise, US
FedEx
Delivered
Sep 5, 2026
779.9 kg
$3,443.74
SH-3337
Folk och fä HB
Bräcke, SE
FedEx
Customs
Sep 9, 2026
14.0 kg
$57.59
SH-3338
Folk och fä HB
Rio de Janeiro, BR
UPS
In transit
Sep 13, 2026
503.7 kg
$2,378.24
SH-3339
Folk och fä HB
Marseille, FR
UPS
Delayed
Sep 24, 2026
261.9 kg
$1,194.94
SH-3340
Bon app'
Cowes, UK
DHL
Delivered
Sep 6, 2026
869.2 kg
$3,642.73
SH-3341
Folk och fä HB
Marseille, FR
FedEx
In transit
Sep 10, 2026
157.2 kg
$434.49
SH-3342
Ernst Handel
Boise, US
FedEx
Delivered
Sep 17, 2026
20.8 kg
$90.55
SH-3343
Island Trading
Rio de Janeiro, BR
UPS
In transit
Sep 27, 2026
564.1 kg
$2,364.81
SH-3344
Ernst Handel
Boise, US
USPS
In transit
Sep 8, 2026
375.3 kg
$1,074.12
SH-3345
Ernst Handel
Graz, AT
UPS
Delayed
Sep 18, 2026
234.7 kg
$801.37
SH-3346
Bon app'
Bräcke, SE
UPS
Customs
Sep 25, 2026
352.9 kg
$1,211.30
SH-3347
Wartian Herkku
Boise, US
FedEx
Delivered
Sep 21, 2026
140.4 kg
$425.14
SH-3348
Hanari Carnes
Oulu, FI
UPS
In transit
Sep 20, 2026
508.9 kg
$2,431.76
SH-3349
Folk och fä HB
Berlin, DE
FedEx
Customs
Sep 10, 2026
603.1 kg
$1,567.05
SH-3350
Hanari Carnes
Marseille, FR
DHL
Customs
Sep 6, 2026
664.6 kg
$3,024.48
SH-3351
Folk och fä HB
Rio de Janeiro, BR
DHL
Delayed
Sep 4, 2026
226.3 kg
$587.38
SH-3352
Bon app'
Oulu, FI
FedEx
In transit
Sep 15, 2026
638.7 kg
$2,091.18
SH-3353
Folk och fä HB
Graz, AT
FedEx
Delayed
Sep 19, 2026
226.7 kg
$528.90
SH-3354
Bon app'
Bräcke, SE
UPS
In transit
Sep 4, 2026
78.5 kg
$179.33
SH-3355
Ernst Handel
Rio de Janeiro, BR
USPS
In transit
Sep 6, 2026
665.0 kg
$2,596.33
SH-3356
Wartian Herkku
Rio de Janeiro, BR
UPS
Customs
Sep 10, 2026
91.1 kg
$425.18
SH-3357
Island Trading
Rio de Janeiro, BR
DHL
Customs
Sep 28, 2026
277.6 kg
$1,143.84
SH-3358
Alfreds Futterkiste
Berlin, DE
UPS
Customs
Sep 26, 2026
374.8 kg
$1,571.87
SH-3359
Hanari Carnes
Bräcke, SE
UPS
Delivered
Sep 4, 2026
807.5 kg
$3,591.89
SH-3360
Wartian Herkku
Oulu, FI
DHL
Delivered
Sep 15, 2026
850.3 kg
$3,622.54
0 selected

Accessibility

KeyEffectFocus
Tabenters the grid on the current cell — the last visited, or the first cell of the body — and leaves it to the next control of the pagethe current cell, or the single widget inside it
ArrowRightmoves one cell to the right; on the last cell of the row it does not move; mirrored in a right-to-left documentthe cell
ArrowLeftthe mirror of ArrowRightthe cell
ArrowDownmoves one cell down; from the header to the filter row, then the body; on the last row it does not move; mounts the row when it is outside the windowthe cell
ArrowUpmoves one cell up; from the first body row to the filter row and the header; on the first header row it does not movethe cell
PageDownmoves down one view of rows, scrolling; on the last row it does not movethe cell
PageUpmoves up one view of rows, scrolling; on the first row it does not movethe cell
Homemoves to the first cell of the rowthe cell
Endmoves to the last cell of the rowthe cell
Ctrl+Homemoves to the first cell of the first body rowthe cell
Ctrl+Endmoves to the last cell of the last row the query left, mounting itthe cell
Ctrl+Spacein range mode, selects the whole column; otherwise nothingthe cell
Shift+Spacein single and multiple, toggles the row; in range, selects the whole rowthe cell
Ctrl+Ain multiple, selects every row the query left; in range, every cell; otherwise nothingthe cell
Shift+ArrowRightin range, extends the range one cell to the right from the anchorthe cell moved to
Shift+ArrowLeftin range, extends the range one cell to the leftthe cell moved to
Shift+ArrowDownin range, extends the range one cell down; in multiple, extends the row selection from the anchorthe cell moved to
Shift+ArrowUpthe mirror of Shift+ArrowDownthe cell moved to
Enteron an editable cell, opens the editor; on a cell with widgets, focuses the first; on a text cell of an activatable row, activates it; on a column header, sorts the columnthe editor, the widget, or the cell
F2opens the editor or enters the cell; a second F2 commits the draft and returns to the cellthe editor, then the cell
alphanumericon an editable text or number cell, opens the editor with the key as its first characterthe editor
Escapein an editor, cancels the draft and returns to the cell; in a widget, returns to the cell; with a range, clears it; during a drag, drag takes itthe cell
Entercommits and moves one row down in the same column in cell mode; commits the row in row modethe cell below, or the same cell
Tabcommits and moves to the next editable cell of the row; Shift+Tab back; on the last, commits and staysthe next editable cell
Spacetoggles the row's checkbox; Shift+Space extends from the anchorthe cell
Shift+Enterappends the column to the sort order instead of replacing itthe cell
Ctrl+Enteropens the column menuthe first item of the menu, then back to the header
Shift+F10opens the column menu anchored to the header cell; the Menu key does the samethe first item of the menu, then back to the header
F2enters the header cell and focuses the first widget of column-actions — the column help, the filter trigger or the column menu; Tab and Shift+Tab cycle the cell's widgets, Escape or a second F2 returns to the cell. Enter on the header still sortsthe first widget of column-actions, then the cell
Ctrl+Shift+ArrowRightwidens the column by one step, announcedthe cell
Ctrl+Shift+ArrowLeftnarrows the column by one step, announcedthe cell
Ctrl+Shift+Enterfits the column to its mounted cellsthe cell
Alt+ArrowRightmoves the column one position later, through drag.moveBythe cell
Alt+ArrowLeftmoves the column one position earlierthe cell
ArrowRightopens the group or the detail; when already open, moves right as usualthe cell
ArrowLeftcloses it; when already closed, moves left as usualthe cell
Ctrl+Ccopies the range, or the current cell, as tab-separated text; not intercepted while the page holds a text selectionthe cell
  • `columns`, `disabledKeys` and a function `rowKey` are compared by identity: a new array or function on a render of the parent re-renders every mounted row, so declare them at module scope or memoize them. The renderers — `cellRenderers`, `editorRenderers`, `renderCell`, `renderEditor`, `renderHeader`, `renderGroup`, `renderDetail` — `messages` and `tree` are read when a row renders and may be written inline, and so may `isRowSelectable` and `isRowMuted`: a row renders again only when its own answer changes. A row renders again for its own row object, selection, cursor, edit or expansion, and for a change of `columns` or the language; a renderer whose output reads state outside its row is refreshed by memoizing `columns` on that state.
  • The root is role="grid": a composite widget with one tab stop. The current cell — or the single simple widget inside it, a link, a button or a checkbox — is the only element with tabindex="0"; Tab enters there and leaves the grid to the next control of the page, which is what the APG requires of a grid and what a table cannot give.
  • Every row carries aria-rowindex against aria-rowcount on the root, and every cell aria-colindex against aria-colcount, always: the grid windows its rows and columns, so the DOM is never the whole set, and the counts are what let a screen reader say “row 4,812 of 9,000”.
  • aria-sort is written on the first sort key’s header only — the practice says more than one is ambiguous — and the whole order is announced through the live announcer: “Sorted by Carrier ascending, Weight descending”. A resize announces the column and its width; a filter announces its sentence through describeFilter; a copy announces the count.
  • A cell that does not edit while others do carries aria-readonly="true"; a draft that fails carries aria-invalid and its message in the title. A selected row carries aria-selected; a cell in a range carries it too, and the root aria-multiselectable in multiple and range.
  • A column with a description is described by it: the header carries aria-describedby to a visually hidden span, and the column menu points at the same span while showing the text aria-hidden, so the words are heard once. The column help is a button with a name — “About ARR” — reached by F2 on the header; Tab cycles the header’s widgets and Escape returns to the cell. Hiding a column is announced as “Carrier hidden”.
  • The header checkbox names what it covers — “Select all 3,412 rows”, or the page in server mode — because a selection over a whole result set is a decision only the query can make. Every control the grid draws has a name: the column menu, the filter trigger, the expander, the group toggle, the operator symbol.

API

data-grid

Props

rowsreadonly Row[]
The records; the grid never mutates them. Left out when a dataSource answers for them.
rowKeykeyof Row | (row) => string
A field name or a function: the key every state model names a row by.
columnsGridColumn<Row>[]
The column model: id, label, description, kind, accessor, format, compare, width, minWidth, maxWidth, flex, priority, sortable, filterable, searchable, editable, resizable, reorderable, hideable, rowHeader, pinned (end by default for kind actions), options, aggregate, validate, parse — and help, a node for the column’s help popover.
descriptionstring
On DataGridColumnWhat the column is: the header’s accessible description, the caption atop its menu and the first line of its help popover.
helpReactNode
On DataGridColumnThe column’s own help, under the description in the popover the column-help button opens. Its presence alone draws the button.
prioritynumber
On DataGridColumnThe lower, the longer the column stays when the frame is too narrow. A column without one leaves before every numbered one; the identity column and an actions column never leave.
popinbooleanDefault true
On DataGridColumnWhether a column with no room moves into the row’s pop-in; false hides it instead.
columnGroupsGridColumnGroup[]
Headings spanning columns, drawn as a row above the names.
mode'client' | 'server'Default inferred
client applies the query to rows; server draws rows as given. server when totalCount or hasMore is present.
totalCountnumber
The whole set’s size in server mode; aria-rowcount and the range read it.
hasMoreboolean
Whether a page past this one exists when the total is unknown; loadMoreTrigger decides what asks for it.
loadingboolean | 'initial' | 'refresh'Default false
Skeleton rows with no answer to keep; aria-busy over an answer already drawn — rows, which dim, or the empty state, which stays. true is initial until the grid has drawn an answer, and refresh after; rows emptied while a load starts wait in the skeleton.
errorstring | null
The message of a failed load; draws the error state with Try again when onRetry is set.
disabledKeysstring[]
Rows that are neither selectable nor editable, drawn with data-disabled.
isRowSelectable(row: Row) => boolean
Whether a row takes part in the selection. A row it refuses leaves the press, the Shift range, Ctrl+A and the header checkbox, and its checkbox is disabled. It keeps its ink, hover, activation and editing, which a row in disabledKeys loses.
isRowMuted(row: Row) => boolean
Draws a row that is no longer active, with data-muted: its cells, its pop-in and the links in them take --slotted-data-grid-color-muted. Hover, selection, activation and editing stay, and the selected ground stays under the muted ink.
queryGridQuery
sort, filter, search, page and group in one object. Present puts the query in controlled mode.
defaultQueryGridQueryDefault emptyQuery()
The query an uncontrolled grid starts from, read once.
onQueryChange(query, request) => void
Asked before the query moves; the request carries change: sort | filter | search | page | group, the reason, and cancel().
columnStateGridColumnState
order, widths, hidden and pinned. Present puts the arrangement in controlled mode; it is normalized against columns.
defaultColumnStatePartial<GridColumnState>
The arrangement an uncontrolled grid starts from, read once.
onColumnStateChange(state, request) => void
Asked before the arrangement moves; the request carries change: order | width | hidden | pinned.
onManageColumns() => void
Called by the column menu’s Manage columns; the application opens its column-manager.
onOutOfSpaceChange(outOfSpace: GridOutOfSpace) => void
Called when the columns a narrow frame took out by priority change — those in the pop-in and those hidden. Never part of columnState.
density'comfortable' | 'compact' | 'dense' | nullDefault the page’s
This grid’s own density, written as data-slotted-density on the root; absent or null, the page’s.
selectionMode'none' | 'single' | 'multiple' | 'range'Default none
Rows, one or many, with the checkbox column in multiple; or a rectangle of cells.
valuestring | string[] | null
The selected row (single) or rows (multiple). Present puts the selection in controlled mode.
defaultValuestring | string[] | null
The selection an uncontrolled grid starts from.
onValueChange(value, request) => void
Asked before the selection moves, with pointer, keyboard, select, clear or programmatic.
rangeGridRange | null
The cell rectangle as anchor and focus, in range mode. Present puts it in controlled mode.
defaultRangeGridRange | null
The rectangle an uncontrolled grid starts from.
onRangeChange(range, request) => void
Asked before the rectangle moves, with pointer, keyboard, clear or programmatic.
currentGridCell | null
Where the cursor stands: a row key (or header, filter, summary, group:<key>) and a column id. Present puts the cursor in controlled mode.
defaultCurrentGridCell | null
Where an uncontrolled cursor starts.
onCurrentChange(cell, request) => void
Asked before the cursor moves, with pointer, keyboard or programmatic.
expandedstring[]
The rows whose detail is open. Present puts it in controlled mode.
defaultExpandedstring[]
The open details an uncontrolled grid starts with.
onExpandedChange(keys, request) => void
Asked before a detail opens or closes.
expandedGroupsstring[] | 'all'
The open groups, or all. Present puts it in controlled mode.
defaultExpandedGroupsstring[] | 'all'Default all
The open groups an uncontrolled grid starts with: every group.
onExpandedGroupsChange(keys, request) => void
Asked before a group opens or closes.
expandableboolean | (row) => booleanDefault true with renderDetail
Which rows have a detail.
editMode'cell' | 'row'Default cell
One cell at a time, or every editable cell of the row.
onEditStart(cell) => void
An editor opened.
onEditCommit(commit) => void | Promise<void>
A draft committed: key, column, value, previous, row, reason and every change of the row. A rejected promise reopens the editor with the draft and the error.
onEditCancel(cell) => void
A draft cancelled.
activatablebooleanDefault false
A double press or Enter on a text cell reports the row through onActivate.
onActivate(event) => void
The row’s key, the reason and the event.
filterRowbooleanDefault false
The row of operands under the header.
filterDebouncenumberDefault 300
Milliseconds a text or number operand in the filter row waits before it applies.
virtualize'auto' | booleanDefault auto
auto windows rows above a hundred and middle columns above twenty.
rowHeightnumber | 'auto'Default density
Pixels per row, read once from the first row when unstated; auto measures every row, capped by --slotted-data-grid-row-max-block-size. While a pop-in is drawn every row is measured, as under auto.
columnOverflow'auto' | 'popin' | 'scroll'Default auto
What a frame too narrow for the template does: popin moves columns into each row’s pop-in by priority; scroll keeps them and scrolls sideways; auto pops in on a frame under 600px, or under 1024px when the main pointer is coarse — a phone, a small tablet — and scrolls elsewhere, where a mouse or a trackpad scrolls and the columns keep their layout.
overscannumberDefault 6
Rows mounted past each edge of the window.
tree{ parentKey, column?, hasChildren? }
Rows as a tree, each naming its parent by key; the open branches are expanded and the root is a treegrid.
onLoadChildren({ key, row }) => void
Called when a branch hasChildren says has children opens and none are in rows.
dataSource{ getRows(query, { signal }), cacheSize? }
The grid asks for its own rows per query, aborting the request before, keeping answers by query; server mode with its own loading and error.
pinnedRows{ top?: string[], bottom?: string[] }
Rows held at the top or the bottom of the body, out of the query and always on screen.
rowsReorderablebooleanDefault false
A grip per row; the pointer drags it and Alt with the vertical arrows moves it. Only while the query is at rest and without a tree.
onRowsReorder({ key, from, to, reason, event }) => void
Where a row goes in rows: from, and the index it takes once moved. The consumer moves it.
highlightChangesboolean | numberDefault false
Marks a mounted cell whose value changed between two rows, for the stated milliseconds (true is 1200).
loadMoreThresholdnumberDefault 20
Rows left below the window before onLoadMore is called.
onLoadMore() => void
Asked for the next page when hasMore is true.
loadMoreTrigger'scroll' | 'button' | 'both'Default scroll
What asks for the next page: nearing the end, with a loading status in the footer; a Load more control; or both.
loadMoreFailedbooleanDefault false
The last page asked for failed: the automatic request stops and the footer offers Try again.
onRetry() => void
The error state’s Try again.
skeletonRowsnumberDefault 8
Rows the first load draws.
pageSizesnumber[]Default 25,50,100
The sizes a page-size control in the footer offers, read through useDataGridDefaults.
variant'plain' | 'ruled' | 'framed'Default ruled
No rules, rules between rows, or the border and the radius.
stripedbooleanDefault false
Every second row tinted.
stickyHeaderbooleanDefault true
The header, the filter row and the summary stay while the rows scroll.
stickyTo'scroll' | 'page'Default scroll
What the header sticks inside: the grid’s own scroller, or the page — which gives up the grid’s own scrolling and windowing.
heightstring | number
The frame’s height; without one the grid grows to its rows.
labelledBystring
The id of the element that names the grid; a native aria-label names it directly, and with neither the grid is named by messages.grid.
messagesPartial<DataGridMessages>
Words laid over the language in force, key by key: every control, state and announcement, the grid’s name (grid), and filterYes and filterNo for a boolean cell. The operator names and symbols are the groups filterOperators and filterSymbols.
localestringDefault the language in force
BCP 47, for the collator, the number and the date formats.
timeZonestring
The zone a timestamp is read in.
renderCell(context) => ReactNode
What a cell draws; cellRenderers does it per column and wins.
renderEditor(context) => ReactNode
What a cell edits with; editorRenderers per column wins. The context carries draft, setDraft, commit and cancel.
renderHeader(context) => ReactNode
What a header draws in place of the label.
renderDetail(row, key) => ReactNode
A row’s detail; its presence draws the expander column.
renderGroup(context) => ReactNode
What a group row draws beside its toggle.
renderEmpty(status) => ReactNode
The empty, no-results or error state in place of the grid’s result state.
renderFilterOperand(context) => ReactNode
The operand control in the panel and the row, for a kind the grid has no field for.
footerReactNode
What stands in the bar under the grid, after the range.
showRangebooleanDefault when paged
Whether the footer states the range.
handleRefObject<DataGridHandle>
focusCell, scrollToRow, scrollToColumn, scrollToCell, startEdit, stopEdit, autofit (one column, or every resizable column as one request, reason programmatic), getOutOfSpace, getVisibleRows, toCsv, exportCsv, reload, selectAll, clearSelection, element.
align'start' | 'center' | 'end'Default start
On GridColumnWhere the value sits; a number column sits at the end unless told otherwise.
numericbooleanDefault false
On GridColumnTabular figures and end alignment; true for kind number.
text'wrap' | 'truncate' | 'nowrap'Default truncate
On GridColumnWhat a long value does.

Events

NamePayloadWhen
onQueryChange(query: GridQuery, request: DataGridQueryRequest)Before the query moves: a sort press, a filter applied, a search, a page, a group. request.change says which; the reason is pointer, keyboard, clear or programmatic; cancel() refuses it.
onColumnStateChange(state: GridColumnState, request: DataGridColumnStateRequest)Before a column is resized, moved, hidden or pinned. request.change says which; the reason is pointer, keyboard or programmatic. A hide is announced; the columns in value.hidden and not in previous.hidden are what an undo shows again.
onOutOfSpaceChange(outOfSpace: GridOutOfSpace)After the frame is measured, whenever the columns in the pop-in or the columns hidden for room change.
onValueChange(value: string | string[] | null, request)Before the row selection moves: a checkbox press, Shift+Space, Ctrl+A, the header checkbox (reason select), or clearSelection (programmatic).
onRangeChange(range: GridRange | null, request)Before the cell rectangle moves, or is cleared with Escape (reason clear).
onCurrentChange(cell: GridCell | null, request)Before the cursor moves: an arrow key, a press, or the grid settling the cursor after its row left (programmatic).
onExpandedChange(keys: string[], request)Before a detail opens or closes.
onExpandedGroupsChange(keys: string[] | 'all', request)Before a group opens or closes.
onEditStart / onEditCommit / onEditCancel(cell) / (commit: DataGridEditCommit) / (cell)When an editor opens; when a draft is committed by Enter, Tab, F2, a press elsewhere or blur (the commit may return a promise); when Escape cancels it.
onActivate(event: DataGridActivateEvent)A double press or Enter on a text cell, or one touch or pen press, while activatable is true.
onLoadMore / onRetry / onManageColumns()The window nears the end with hasMore; the error state’s Try again; the column menu’s Manage columns.

Composition

DataGridDefaultsProvidercomponent
On ApplicationSets variant, striped, stickyHeader, stickyTo, selectionMode, editMode, filterRow, virtualize, rowHeight, columnOverflow, overscan, pageSizes, filterDebounce, loadMoreThreshold, loadMoreTrigger and skeletonRows once for a subtree. A grid that states one itself still wins. Its words and its locale come from the language in force (SlottedProvider).
@slotted/core/gridmodule
On ApplicationapplyQuery, emptyQuery, withSortPress, withColumnFilter, withSearch, withPageIndex, withGroup, toGridParams, fromGridParams, normalizeColumnState, serializeColumnState, parseColumnState: the engine the grid runs on, for a server mock, a URL and a saved view.
renderCell, renderEditor, renderHeader, renderDetail, renderGroup, renderEmpty, renderFilterOperandrender props
Every surface a consumer replaces, per grid or per column through cellRenderers and editorRenderers. row, cell, head and body are fixed: the layout and the roles are theirs.
footerReactNode
Pagination, a page-size select, a count: the consumer’s own controls in the bar the grid draws.
handleDataGridHandle
The imperative surface for what cannot be said declaratively: focusCell, scrollToRow, scrollToColumn, startEdit, stopEdit, autofit, getOutOfSpace, getVisibleRows, toCsv, exportCsv, reload, selectAll, clearSelection.
native propsattributes
Anything a div takes reaches the root; a consumer’s onKeyDown runs before the grid’s and preventDefault stops it. ref reaches the root element.
FilterBar, Pagination, ColumnManagerfamilies
On Beside the gridThe bar edits query.filter; pagination moves query.page in the footer; column-manager edits columnState.

Parts

PartElementRequiredPurpose
rootdiv[role="grid"]YesThe frame and the widget: data-ui="data-grid", every axis, aria-rowcount, aria-colcount, aria-multiselectable, aria-busy, and the column template as --slotted-data-grid-template.
scrolldivYesThe scroller on both axes, and the window the virtualiser measures. Carries data-overflowing, data-at-start and data-at-end while the columns overflow.
headdiv[role="rowgroup"]YesThe header rows, sticky to the top of the scroller by default.
header-rowdiv[role="row"]YesOne row of the header: the column groups, or the column names.
column-groupdiv[role="columnheader"]NoA group heading spanning its columns through aria-colspan.
column-headerdiv[role="columnheader"]YesA column’s name and its controls. Carries aria-sort on the first sort key, data-sorted, data-filtered, data-pinned, data-dragging, data-drop-target and data-resizing. The name truncates, and a name its box cuts opens a hint with the whole of it — shown rather than read, because the header already states the words.
sortspanNoThe direction mark on a sorted column, with data-index when the order holds more than one key.
column-descriptionspanNoThe column’s description, visually hidden, referenced by the header’s aria-describedby and by the column menu’s; present whenever the column has a description.
column-actionsspanNoThe slot at the trailing edge holding the column help, the filter trigger and the column menu. F2 on the header enters it, Tab cycles it, Escape leaves it.
column-helpbuttonNoThe circled question mark on a column with a description or a help node, always shown. Opens a popover by click, Enter or Space — never by hover — holding both.
column-menubuttonNoOpens the column’s menu: sort, filter, pin, fit, fit all, hide, manage.
column-menu-descriptiondiv[aria-hidden]NoThe description again, as a muted caption atop the column menu; hidden from the reader, who hears it once through the menu’s aria-describedby.
resizerdiv[aria-hidden]NoThe pointer’s handle on the trailing edge; a double press fits the column.
resize-guidediv[aria-hidden]NoThe line a drag of the resizer moves by translate across the scroller’s height; the width is applied on release.
drop-indicatordivNoThe line between two columns while one is dragged.
filter-rowdiv[role="row"]NoThe row under the header, with filterRow, holding one operand per filterable column.
filter-celldiv[role="gridcell"]NoOne cell of the filter row; data-filtered while its column has a rule.
filterbuttonNoThe funnel on a filtered column, and the shortest way back to its panel.
filter-paneldivNoThe compact panel in a popover, carrying data-ui itself because it is rendered outside the root.
filter-conditiondivNoOne line of the panel: the operator and its operand(s); data-operands says how many.
filter-operatordivNoThe operator chooser: a select in the panel, a symbol button in the row.
filter-operanddivNoThe operand control(s), with data-kind and data-range for a between.
filter-joindivNoAnd / Or between the two conditions of the panel.
filter-actionsdivNoClear and Apply.
bodydiv[role="rowgroup"]YesThe rows; carries the virtual window’s total height and start offset.
pinned-rowsdiv[role="rowgroup"]NoRows held under the head or over the summary, out of the query.
rowdiv[role="row"]YesOne record: aria-rowindex, aria-selected, data-selected, data-current, data-expanded, data-editing, data-disabled.
row-headerdiv[role="rowheader"]NoThe cell of the column marked rowHeader, which a screen reader repeats for the record.
celldiv[role="gridcell"]YesOne value: aria-colindex, data-align, data-numeric, data-text, data-pinned, data-current, data-in-range, data-range-edge, data-editing, data-invalid, data-loading, data-readonly.
editordivNoThe control editing a cell, plain and sm, filling it.
selectiondiv[role="gridcell"]NoThe checkbox column, always pinned to the start; in the header it selects every row the query left.
expanderbuttonNoOpens a row’s detail; aria-expanded and aria-controls.
detaildiv[role="row"]NoThe open detail: one cell spanning every column, held to the frame’s width.
popin-headerdiv[role="columnheader"]NoThe pop-in’s column, last in the header row while columns are out of space: messages.popinHeader, visually hidden, with no track.
popindiv[role="gridcell"]NoThe last cell of a record’s row and of the summary while columns are out of space: the row’s second line, every track, held to the frame’s width; aria-colindex is the last.
popin-fielddivNoOne column in the pop-in, in the order of the columns: its label over its value.
popin-labelspanNoThe column’s label, in the small muted type; left out for a column with none.
popin-valuedivNoThe value, drawn by the column’s cell renderer with the cell’s own context; an editable column is read only here.
group-rowdiv[role="row"]NoA group heading: aria-level, aria-expanded, the value, the count, the aggregates.
group-togglebuttonNoOpens and closes a group.
tree-togglebuttonNoOpens and closes a tree row’s children; a leaf keeps its room empty.
row-handlebuttonNoThe grip a row is dragged by; disabled while the query is not at rest.
summarydiv[role="rowgroup"]NoThe aggregates of the whole query, pinned to the end.
summary-celldiv[role="gridcell"]NoOne aggregate.
emptydivNoThe result-state for no rows, no results or an error, held to the frame’s width.
loaderdiv[role="rowgroup"]NoSkeleton rows on a first load.
footerdivNoThe bar under the grid: the range, the consumer’s pagination, load more.
actionsdivNoRow actions inside a cell of kind actions, revealed by hover and by the cursor.

Theming

Each token is a CSS custom property: set it in a theme, or on any element to retune every data grid inside it.

Data grid tokens

TokenDefault
--slotted-data-grid-band-surfacecolor-mix(in oklab, var(--slotted-text, CanvasText) 4%, var(--_surface))
--slotted-data-grid-block-sizeauto
--slotted-data-grid-border-colorvar(--slotted-border-subtle, ButtonBorder)
--slotted-data-grid-border-color-strongvar(--slotted-border-strong, ButtonBorder)
--slotted-data-grid-border-widthvar(--slotted-border-width-thin, 1px)
--slotted-data-grid-cell-padding-blockmax( var(--slotted-space-2, 0.25rem), calc((var(--_head-block) - var(--_font-size) * var(--slotted-line-height-md, 1.5)) / 2) )
--slotted-data-grid-cell-padding-inlinevar(--slotted-control-padding-inline-md, 13px)
--slotted-data-grid-changed-surfacecolor-mix(in oklab, var(--slotted-tone-accent-solid, Highlight) 24%, transparent)
--slotted-data-grid-colorvar(--slotted-text, CanvasText)
--slotted-data-grid-color-mutedvar(--slotted-text-muted, GrayText)
--slotted-data-grid-control-radiusvar(--slotted-radius-sm, 4px)
--slotted-data-grid-cursor-colorvar(--slotted-tone-accent-border, Highlight)
--slotted-data-grid-filter-operator-size7rem
--slotted-data-grid-filter-panel-size24rem
--slotted-data-grid-filter-panel-size-date28rem
--slotted-data-grid-filter-panel-size-datetime34rem
--slotted-data-grid-font-familyvar(--slotted-control-font-family)
--slotted-data-grid-font-sizevar(--slotted-control-font-size-md, 13px)
--slotted-data-grid-gapvar(--slotted-control-gap-md, 8px)
--slotted-data-grid-head-block-sizevar(--slotted-control-height-md, 34px)
--slotted-data-grid-header-surfacecolor-mix(in oklab, var(--slotted-text, CanvasText) 8%, var(--_surface))
--slotted-data-grid-header-surface-hovercolor-mix(in oklab, var(--slotted-text, CanvasText) 7%, var(--_head-surface))
--slotted-data-grid-icon-sizevar(--slotted-control-icon-size-md, 16px)
--slotted-data-grid-indentvar(--slotted-space-6, 1rem)
--slotted-data-grid-pin-shadow-colorcolor-mix(in oklab, var(--slotted-scrim, rgb(0 0 0 / 0.5)) 22%, transparent)
--slotted-data-grid-pin-shadow-sizevar(--slotted-space-5, 0.75rem)
--slotted-data-grid-radiusvar(--slotted-radius-md, 6px)
--slotted-data-grid-range-surfacevar(--slotted-tone-accent-surface, Canvas)
--slotted-data-grid-resize-guide-colorvar(--slotted-focus-ring-color, Highlight)
--slotted-data-grid-resize-guide-widthvar(--slotted-border-width-thick, 2px)
--slotted-data-grid-row-block-sizevar(--_head-block)
--slotted-data-grid-row-border-color-selectedvar(--slotted-tone-accent-border, Highlight)
--slotted-data-grid-row-color-selectedvar(--_text)
--slotted-data-grid-row-max-block-sizecalc(var(--_row-block) * 4)
--slotted-data-grid-row-surface-hovervar(--slotted-tone-secondary-subtle-hover, ButtonFace)
--slotted-data-grid-row-surface-selectedcolor-mix(in oklab, var(--_selected-edge) 20%, var(--_surface))
--slotted-data-grid-row-surface-selected-hovercolor-mix(in oklab, var(--_selected-edge) 28%, var(--_surface))
--slotted-data-grid-row-surface-stripecolor-mix(in oklab, var(--slotted-text, CanvasText) 5%, var(--_surface))
--slotted-data-grid-shadowvar(--slotted-shadow-xs, none)
--slotted-data-grid-sticky-offset0
--slotted-data-grid-sticky-offset-end0
--slotted-data-grid-surfacevar(--slotted-ground, var(--slotted-surface, Canvas))

Theme tokens it reads

TokenDefault
--slotted-border-strongSet per scheme by the theme
--slotted-border-subtleSet per scheme by the theme
--slotted-border-width-thick2px
--slotted-border-width-thin1px
--slotted-control-font-familyvar(--slotted-font-family-sans)
--slotted-control-font-size-mdcomfortable 13px · compact 12px · dense 12px
--slotted-control-font-size-smcomfortable 12px · compact 12px · dense 12px
--slotted-control-gap-mdcomfortable 8px · compact 6px · dense 4px
--slotted-control-height-lgcomfortable 38px · compact 32px · dense 30px
--slotted-control-height-mdcomfortable 34px · compact 28px · dense 26px
--slotted-control-height-smcomfortable 30px · compact 26px · dense 24px
--slotted-control-icon-size-mdcomfortable 16px · compact 14px · dense 13px
--slotted-control-inner-size-smcomfortable 22px · compact 18px · dense 16px
--slotted-control-invalid-edge-widthvar(--slotted-border-width-thin)
--slotted-control-padding-inline-mdcomfortable 13px · compact 10px · dense 8px
--slotted-control-padding-inline-smcomfortable 10px · compact 8px · dense 6px
--slotted-control-transition-durationvar(--slotted-duration-short)
--slotted-control-transition-easingvar(--slotted-easing-standard)
--slotted-disabled-foregroundSet per scheme by the theme
--slotted-duration-long320ms
--slotted-duration-loop1.1s
--slotted-duration-short120ms
--slotted-easing-standardcubic-bezier(0.2, 0, 0, 1)
--slotted-focus-ring-colorSet per scheme by the theme
--slotted-focus-ring-color-invalidSet per scheme by the theme
--slotted-focus-ring-offsetvar(--slotted-border-width-thick)
--slotted-focus-ring-widthvar(--slotted-border-width-thick)
--slotted-font-size-xs0.75rem
--slotted-font-weight-medium500
--slotted-font-weight-regular400
--slotted-font-weight-semibold600
--slotted-groundvar(--slotted-surface, Canvas)
--slotted-line-height-md1.5
--slotted-popover-gap0.5rem
--slotted-popover-padding-block-smvar(--slotted-space-4, 0.5rem)
--slotted-popover-padding-inline-smvar(--slotted-space-5, 0.75rem)
--slotted-radius-md6px
--slotted-radius-sm4px
--slotted-scrimSet per scheme by the theme
--slotted-shadow-xsSet per scheme by the theme
--slotted-space-10.125rem
--slotted-space-20.25rem
--slotted-space-30.375rem
--slotted-space-40.5rem
--slotted-space-50.75rem
--slotted-space-61rem
--slotted-space-81.5rem
--slotted-surfaceSet per scheme by the theme
--slotted-surface-sunkenSet per scheme by the theme
--slotted-target-comfortable44px
--slotted-target-min24px
--slotted-textSet per scheme by the theme
--slotted-text-mutedSet per scheme by the theme
--slotted-tone-accent-borderSet per scheme by the theme
--slotted-tone-accent-solidSet per scheme by the theme
--slotted-tone-accent-surfaceSet per scheme by the theme
--slotted-tone-accent-textSet per scheme by the theme
--slotted-tone-danger-borderSet per scheme by the theme
--slotted-tone-secondary-subtle-hoverSet per scheme by the theme
--slotted-z-index-sticky100