DesignOverviewDesign SystemMapsGraphIntroductionInstallationDeriving a themeSandboxTheme builderVisual testingAgentsCortexMemoryActiveProvenanceActiveContextActiveServicesInsightsGet in touchSource on GitHub
Loading the reference
Data TableView sourceEdit in SandboxView MarkdownCopy MarkdownOpen in ClaudeOpen in CursorA table drawn from an array of rows, with sorting, filtering, and paging.Also called Grid, Result table, and Data grid.StableSince 0.1.0DataImportimport'@fusion.dev/helix/data-table'import'@fusion.dev/helix/table'// Tableimport'@fusion.dev/helix-headless/data-table'import'@fusion.dev/helix-headless/table'// TablePreview
GuidelinesWhen to use
Rows you pass as an array, sorted, filtered, and paged across the whole set.Data TableThis page
Import Table beside Data Table.A column is the Table family's TableColumn, which Data Table does not register.
Write the first page as TableRow and TableCell elements under the columns.A server does not pass the columns to the table, so on its own it serves the headings and no values.<helix-data-tabledefault-sort="name:asc"id="files"label="Files"page-size="4"><helix-table-columnfield="name"sortable>Name</helix-table-column><helix-table-columnfield="region"sortable>Region</helix-table-column><helix-table-columnfield="size"sortabletext-align="end">Size</helix-table-column><!-- The first page, in the table's sort and page size, formatted as its columns draw it. A server writes these from the same rows. --><helix-table-row><helix-table-cellheader>archive.tar.gz</helix-table-cell><helix-table-cell>us-east-1</helix-table-cell><helix-table-cell>4.8 MB</helix-table-cell></helix-table-row><helix-table-row><helix-table-cellheader>backup.sql</helix-table-cell><helix-table-cell>eu-central-1</helix-table-cell><helix-table-cell>918.4 kB</helix-table-cell></helix-table-row><helix-table-row><helix-table-cellheader>index.json</helix-table-cell><helix-table-cell>us-east-1</helix-table-cell><helix-table-cell>2.1 kB</helix-table-cell></helix-table-row><helix-table-row><helix-table-cellheader>manifest.yaml</helix-table-cell><helix-table-cell>ap-south-1</helix-table-cell><helix-table-cell>812 B</helix-table-cell></helix-table-row></helix-data-table><script>/* The table shows the rows above until `rows` holds a row, then draws its own in their place. The size is formatted the same way on both sides, in one locale, so the two pages match. */constunits=['B','kB','MB','GB']constbytes=(value)=>{conststep=Math.min(units.length-1,Math.floor(Math.log10(Math.max(value,1))/3))constamount=newIntl.NumberFormat('en-US',{maximumFractionDigits:step===0?0:1,}).format(value/1000**step)return`${amount}${units[step]}`}constfiles=document.getElementById('files')constsize=files.querySelector('[field="size"]')size.cell=(row)=>bytes(row.size)size.compare=(row)=>row.sizefiles.rows=[{name:'archive.tar.gz',region:'us-east-1',size:4_823_100},{name:'backup.sql',region:'eu-central-1',size:918_400},{name:'index.json',region:'us-east-1',size:2_100},{name:'manifest.yaml',region:'ap-south-1',size:812},{name:'profile.bin',region:'eu-west-2',size:61_440},{name:'report.pdf',region:'us-west-1',size:1_204_000},{name:'snapshot.img',region:'eu-central-1',size:9_800_000},{name:'trace.log',region:'ap-south-1',size:44_900},]</script>
Style what a cell draws with cellStyles.A cell renders in the table's shadow root, where tokens reach it and a class from your stylesheet does not.
Anatomy
1::part(head)The row that holds the column headings. It is display: contents, so it takes no space.
2::part(row)One row of data.
3::part(cell)One cell.
4::part(pagination)OptionalThe built-in pagination, when it is shown.
API referenceRoothelix-data-tableA table drawn from an array of rows, with sorting, filtering, and paging.
PropTypeDescriptionascendingLabelstringDefault"ascending"The word for an ascending sort, in a sorted-label that writes {order}.batchEditsbooleanDefaultfalseHolds each saved cell as an unsaved change, marked in its corner, and
draws a bar under the grid that saves or discards every one at once.
Off, a cell saves as you leave it.bleedboolean|"inset"DefaultfalseSets the words of its rows on the table's own edge, with each fill reaching past it.canceledLabelstringDefault"Canceled"What screen readers hear when a held row is put back, or a move is
refused, with reorderable-rows.cellStylesCSSStyleSheet[]Default[]Style sheets for the markup a column's cell returns, which renders in this
shadow root, where your document's rules stop.childFieldstringThe field that holds a row's child rows, as an array. Set it, and row-key,
and the grid becomes a tree grid.columnsstringDefault""The column tracks, as a grid track list such as 2fr 1fr max-content,
dealt out one track to a column in the order the columns are written. A
column's own width wins in its place, and a column it does not reach
takes the track a column with no width takes.defaultExpandedstringDefault""The keys of the rows open at the start, separated by commas. Used until
expanded is set.defaultFilterstringDefault""The starting search query, used until filter is set.defaultOrderstringDefault""The starting column order, used until order is set.defaultPagenumberDefault1The starting page, used until page is set.defaultPageSizenumberDefault0The starting page size, used until pageSize is set.defaultSelectedstringDefault""The keys selected at the start, separated by commas. Used until selected
is set.defaultSortstringDefault""The starting sort order, used until sort is set.defaultViewstringDefault""The starting view, as JSON, such as {"sort":"due:asc","columns":{"hidden":["notes"]}}.
The parts it names are put in force once, before the table first draws,
and view holds them after.descendingLabelstringDefault"descending"The word for a descending sort, in a sorted-label that writes {order}.discardEditsLabelstringDefault"Discard"The words on the bar's button that discards the unsaved changes, with batch-edits.droppedLabelstringDefault"Dropped"What screen readers hear when a row is dropped, with reorderable-rows.editOn"click"|"double-click"Default"click"What opens an editable cell that draws no field at rest, because its
column sets cell or editor: click, where a single press opens it, or
double-click, a spreadsheet's way. Every other editable cell is its
field already, which a press reaches. Enter, F2, and typing open a cell
either way, and a boolean cell toggles on one press whatever this says.emptyTextstringDefault"Nothing to show"The text shown and announced when there are no rows and none are loading.errorTextstringDefault""The text shown and announced when the rows could not load, such as "The
files did not load". Set it when a fetch fails, and clear it once you try
again. Empty, the default, shows nothing.estimatenumberDefault32The estimated height of a row before it is drawn, in pixels.expandedstringThe keys of the open rows in a tree grid, separated by commas, the shape of
selected. A reader's press writes it and then sends helix-expand.filterstringThe search query. A row is shown when the query matches any of its columns.flashChangesbooleanDefaultfalseLights up a row whose data changes, and a row that arrives in rows after
the table has drawn, so you see what live data or an agent changed. Wants
row-key, which is how a row is known across the change.gapLabelstringDefault"Skip to page {page}"The built-in pagination's name for a gap in its run of pages. {page} is
replaced with the page it jumps to.hideColumnLabelstringDefault"Hide column"The name of the row in a column's menu that hides the column.labelstringDefault""The grid's name, read by screen readers.loadingbooleanDefaultfalseWhether the rows are still loading.loadingTextstringDefault"Loading"The text shown and announced while the rows load.loadMorebooleanDefaultfalseDraws a row after the last one with a button that asks for more rows.loadMoreLabelstringDefault"Load more"The words on the button in the more row.localestringDefault""The locale the words, plural forms, and numbers are in, as a BCP 47 tag
such as pl. Empty reads the nearest lang, then the browser's
language. The built-in pagination speaks it too.maxMessagestringDefault"Enter {max} or less."The message for an edited cell over its column's max. {max} is the largest value.minMessagestringDefault"Enter {min} or more."The message for an edited cell under its column's min. {min} is the smallest value.mode"client"|"server"Default"client"Where filtering, sorting, and paging happen. client does them in the
table, and server leaves them to your code.movedLabelstringDefault"{name} moved to position {position} of {count}"What screen readers hear each time a key moves a held row, with
reorderable-rows. {name} is the row's name, {position} the place it
would go, counting from 1, and {count} the number of rows on the page.moveLeftLabelstringDefault"Move left"The name of the row in a column's menu that moves the column left.moveRightLabelstringDefault"Move right"The name of the row in a column's menu that moves the column right.moveRowLabelstringDefault"Move {row}"The name of a row's grip, with reorderable-rows. {row} is replaced with
the row's name.nextLabelstringDefault"Next page"The built-in pagination's name for the button that moves forward a page.numberMessagestringDefault"Enter a number."The message for an edited number cell that holds something other than a number.orderstringThe column order, as field names separated by spaces.pagenumberThe page shown, counting from 1.pageLabelstringDefault"Page {page}"The built-in pagination's name for one page. {page} and {pages} are
replaced with the page number and the page count.pageSizenumberThe number of rows on a page. 0 shows every row, with no paging.paginatedbooleanShows a pagination under the grid.paginationLabelstringDefault"Pagination"The name of the built-in pagination's navigation landmark.patternMessagestringDefault"Enter a value in the form this column takes."The message for an edited cell that does not match its column's pattern.pickedUpLabelstringDefault"Picked up {name}"What screen readers hear when a key or a click picks up a row, with
reorderable-rows. {name} is the row's name.previousLabelstringDefault"Previous page"The built-in pagination's name for the button that moves back a page.reorderablebooleanDefaultfalseLets users reorder the columns.reorderableRowsbooleanDefaultfalseLets people move rows, by a grip that leads each row. The table moves no
row itself: set rows to the order helix-reorder carries.requiredMessagestringDefault"Enter a value."The message for an edited required cell left empty.resultLabelstringWhat screen readers hear when a search leaves one row, where
results-label should not say it. {count} is the count.resultsLabelstringDefault"{count} of {total, plural, one {# row} other {# rows}}"What screen readers hear when a search or a filter narrows the rows.
{count} is how many rows are left and {total} how many there are,
written in the locale, and each language writes the forms it has:
{count} z {total, plural, one {# wiersza} other {# wierszy}}.rowGripsLabelstringDefault"Move rows"The name of the heading over the row grips, with reorderable-rows.rowKeystringDefault""The field that identifies each row.rowLinkbooleanWhether a press on a row works the first link or button in its cells.rowParts(row: DataRow, index: number) => stringReturns part names to add to a row, for a row that marks itself, such as
blocked, or every second row.rowsreadonlyDataRow[]Default[]Every row of the result, in the order it arrived.saveEditsLabelstringDefault"Save"The words on the bar's button that saves the unsaved changes, with batch-edits.savingLabelstringDefault"Saving"What a screen reader hears beside a cell that is saving.selectablebooleanDefaultfalseAdds a column of checkboxes for selecting rows.selectAllLabelstringDefault"Select every row"The name of the checkbox in the heading that selects every row.selectedstringThe keys of the selected rows, separated by commas.selectedLabelstringDefault"{count} selected"What screen readers hear when the chosen rows change. {count} is how many
rows are chosen, written in the locale, and a language that needs plural
forms writes them: {count, plural, one {# wybrany} few {# wybrane} many {# wybranych} other {# wybranego}}.selectionBehavior"replace"|"toggle"Default"toggle"What a key or a press on a row does to the rows already selected, in a
selectable table. toggle, the default, keeps them: Space adds or takes
out the row. replace selects the row alone, as a file list does: Down and
Up carry the selection with them, and a press on a row selects it. Control
or Command with a press or Space adds or takes out one row, and with a move
goes without selecting. The checkboxes add or take out one row either way.selectRowLabelstringDefault"Select {row}"The name of a row's checkbox. {row} is replaced with the row's value in
the first column that has a field, or with its key.showColumnsLabelstringDefault"Show hidden columns"The name of the row in a column's menu that brings back the columns it hid.sortstringThe sort order, as field:direction.sortAscendingLabelstringDefault"Sort ascending"The name of the row in a column's menu that sorts smallest first.sortDescendingLabelstringDefault"Sort descending"The name of the row in a column's menu that sorts largest first.sortedLabelstringDefault"{direction, select, ascending {Sorted by {column}, ascending} descending {Sorted by {column}, descending} other {Sorted by {column}}}"What screen readers hear when the table is sorted. {column} is the
column's heading and {direction} is ascending or descending, so each
order has its whole sentence. {order} is the deprecated
ascending-label or descending-label.totalnumberDefault0The number of rows in the whole result, for when the table cannot count
them.unsavedLabelstringDefault"{count, plural, one {# unsaved change} other {# unsaved changes}}"What the bar says, with batch-edits. {count} is how many changes are unsaved.unsortedLabelstringDefault"Not sorted"What screen readers hear when the table stops being sorted.viewDataTableViewEverything a reader can change about how the rows are shown, as one value:
the search in query, the column filters, the sort, the columns'
order, hidden fields, pinned ends and widths, and the pageSize.windowedbooleanDefaultfalseDraws only the rows in view, with empty space in place of the rest.xlsx((data: ExportData) => Uint8Array)A function that writes an XLSX file, which @fusion.dev/helix/data-table/xlsx
exports as toXlsx. Set it to offer XLSX in download and in a bound
TableExport. It is its own entry, so a table that never writes a
spreadsheet does not carry the writer.
ReadTypeDescriptiondroppedFieldsstring[]The fields of the columns left out at the table's width, for their min-table-width.everyRowCountnumberEvery row before the search and the filters narrow them: the rows the
table holds, or total in server mode.matchednumberHow many rows match the filter, across every page.orderedColumnsHelixHeadlessTableColumn[]The columns in their current order.tableColumnsHelixHeadlessTableColumn[]The columns declared as children, in the order they are written.unsavedCountnumberHow many changes are held unsaved, under batch-edits.whenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)The columns, as TableColumn elements, and the first page served as TableRow elements, which show until rows holds a row.emptyContent shown when there are no rows to show and none are loading, such as a picture and a link. Falls back to empty-text, which the live region still says.errorContent shown after error-text while it is set, such as a button that tries again.footerContent below the grid. It replaces the built-in pagination.loadingContent shown while the rows load, such as a spinner. Falls back to loading-text, which the live region still says.selectionContent that takes the toolbar's place while rows are selected, such as a SelectionBar with what you can do to them.toolbarContent above the grid, such as a search field or actions.
EventTypeDescriptionhelix-before-cell-commitHelixBeforeCellCommitEventA cell's new value is about to be saved. Cancelable: cancel it to keep the old value, or pass a check to detail.waitUntil.helix-before-cell-editHelixBeforeCellEditEventA cell is about to open for an edit. Cancelable: cancel it to keep the cell closed.helix-before-column-toggleHelixBeforeColumnToggleEventA column is about to be hidden or shown, with its field and hidden. Cancelable: cancel it to keep the column as it is.helix-before-exportHelixBeforeExportEventA file of the rows is about to be made, from Export or download, with the choices, the file's name, and the view. Cancelable: cancel it to make the file on your server.helix-before-filterHelixBeforeFilterEventThe search query is about to change. Cancelable: cancel it to keep the current query.helix-before-followHelixBeforeFollowEventA press on a link in a cell is about to load its page, in this tab and on this site. Cancelable: cancel it to keep the page, and hand detail.href to your router.helix-before-navigateHelixBeforeNavigateEventAnother page was requested. Cancelable: cancel it to stay on the current page.helix-before-reorderHelixBeforeReorderEventA row or a column is about to move. For a row, with reorderable-rows, the event carries every row's key in the new order; for a column, kind is column and value holds every field in the new order. Cancelable: cancel it to keep the row or the column where it is.helix-before-selectHelixBeforeSelectEventThe selection is about to change. The event carries every selected key, separated by commas. Cancelable: cancel it to keep the current selection.helix-before-sortHelixBeforeSortEventA different sort order was requested. Cancelable: cancel it to keep the current order.helix-before-view-changeHelixBeforeViewChangeEventThe view is about to change, with the whole view it would leave in detail.view and as JSON in detail.value. Sent before the event for the part that changes. Cancelable: cancel it to keep the view, and set view, rows and total from your server.helix-cell-commitHelixCellCommitEventFired after a cell's new value is saved into a copy of its row in rows.helix-cell-editHelixCellEditEventFired after a cell opens for an edit.helix-column-toggleHelixColumnToggleEventFired after a column is hidden or shown, with its field and hidden.helix-expandHelixExpandEventFired after a row opens or closes, with every open row's key, separated by commas, which expanded also holds.helix-exportHelixExportEventFired as the browser saves a file of the rows, with the same detail.helix-filterHelixFilterEventFired after the search query changes, with the new query.helix-followHelixFollowEventFired as the browser loads the page a link in a cell names, with its path.helix-load-moreHelixLoadMoreEventFired when a reader asks for more rows, by the load-more row's button or by scrolling a windowed table near its end.helix-navigateHelixNavigateEventFired after the page changes, with the new page in detail.page and as a string in detail.value.helix-reorderHelixReorderEventFired after the columns move, with kind set to column and every field in the new order. For a row, with kind set to row, it follows helix-before-reorder, and you set rows to the order in keys.helix-selectHelixSelectEventFired after the selection changes, with every selected key, separated by commas.helix-sortHelixSortEventFired after the sort order changes, with the new order.helix-view-changeHelixViewChangeEventFired after the view changes, with the whole view in detail.view and as JSON in detail.value.
MethodTypeDescriptioncancelEdit() => voidCloses the open cell and puts its old value back, as Escape does.commitEdit(rows: unknown, columns: unknown, refocus: unknown) => Promise<boolean>Saves the open cell, as Enter, Tab or leaving it does, and moves the tab
stop by rows and columns. Checks required, min, max, pattern
and validate, asks with helix-before-cell-commit, waits on any check
its listener passed to waitUntil, then writes the value into a copy of
the row in rows and fires helix-cell-commit. Under batch-edits the
value is held as an unsaved change. Returns whether the value was saved.countView(part: PartialView) => number | undefinedHow many rows a view would show, counted from the rows the table holds:
the view with the parts of part laid over it, the way requestView lays
them. Quick Filters counts each preset with it. Nothing in server mode,
where the table holds one page, and in a tree grid.csv() => stringReturns the result as CSV: every row that matches the filter, in the order
and columns shown, under a line of the column headings.discardEdits() => voidDrops every unsaved change, as the bar's Discard does, under batch-edits.download(options: ExportOptions & { filename?: string }) => booleanSaves an export as a file, as a reader's Export does.editCell(row: DataRow, field: string, typed: string) => booleanOpens a cell for an edit, as Enter, F2, a double click or typing does.
Asks first with helix-before-cell-edit. typed starts the field with
those characters in place of the value. Returns whether the cell opened.exportData(options: ExportOptions) => ExportDataThe rows and columns an export holds, before they are written: the
headings, the fields, and each row's values.exportRows(options: ExportOptions) => stringWrites an export as text: CSV by default, or TSV or JSON with format.
See exportData for the rows, columns and values. XLSX is a file and not
text, which download writes.facetsOf(field: string) => Facet[]Every value a column holds, with how many rows hold each, most first.hideColumn(field: string) => booleanHides a column, as Hide column in its menu does.operatorsOf(field: string) => readonlyFilterOperatorInfo[]The comparisons a column's filter offers, for its type. Your own filter
picker can list them.pinOf(field: string) => PinEdge | undefinedWhich end a column is pinned to, if it is.requestView(next: PartialView) => booleanAsks for a different view, as a reader's change does: helix-before-view-change,
which can refuse it, then helix-view-change. The parts next names
replace those parts, whole, and the rest stay, so a preset can name only
its filters. Returns whether the view changed.saveEdits() => voidWrites every unsaved change into rows, as the bar's Save does, under batch-edits.search(query: string) => booleanFilters the rows by a query from your own search field.selectRows(keys: readonlystring[]) => booleanSelects these rows by key, and no others, as a reader's choice does: it
asks with helix-before-select. An empty list clears the selection, which
Clear in a SelectionBar does. Returns whether the selection changed.showColumn(field: string) => booleanShows a hidden column. Asks with helix-before-column-toggle, and returns
whether the column was shown.toggleSort(field: string) => booleanCycles the sort order of one column, as a click on its heading does.
PartDescriptionafterThe space that stands in for the rows below the window. Only while windowed.beforeThe space that stands in for the rows above the window. Only while windowed.cellOne cell.cell-booleanAdded to cell in an editable boolean column, which holds a checkbox that toggles in place.cell-editableAdded to cell in a column a reader can edit.cell-editingAdded to cell while it is open for an edit.cell-fieldAdded to cell in an editable column that draws its field at rest, as every one does that has no cell or editor of its own.cell-headerAdded to cell for a cell of the row header column.cell-invalidAdded to cell while its value breaks a rule, beside cell-message.cell-messageThe message for a value a rule refuses, inside the open cell. The field names it as its description.cell-pinned-endAdded to cell in a column the view pins to the end of the row.cell-pinned-startAdded to cell in a column the view pins to the start of the row.cell-savingAdded to cell while a check the page passed to waitUntil is under way.cell-saving-markSays a cell is saving, inside it. Read by a screen reader, and drawn as a mark in the styled tier.cell-selectedAdded to cell in a selected row.cell-unsavedAdded to cell while its change is held unsaved, under batch-edits.checkboxA row's checkbox, or the checkbox in the heading that selects every row.checkbox-boxThe box drawn for the checkbox's input.checkbox-controlThe checkbox's input.checkbox-feedbackForwarded from the checkbox. Not shown in the table.checkbox-fieldThe row that holds the checkbox's box.checkbox-hintForwarded from the checkbox. Not shown in the table.checkbox-labelForwarded from the checkbox. The label is read by screen readers only.checkbox-markThe check mark, or the dash while some rows are selected.checkbox-mark-checkedAdded to checkbox-mark while its box is checked.checkbox-mark-dashAdded to checkbox-mark while it draws the dash, which it keeps until its box is checked.checkbox-mark-indeterminateAdded to checkbox-mark while only some rows are selected.drag-previewA copy of the row a pointer drags by its grip, which follows the pointer in the top layer until the row is let go, with reorderable-rows. Hidden from assistive technology.editorThe field an open cell edits in: an Input, a NumberInput, a DateInput, or a Select, as the column's type picks.editor-feedbackForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-hintForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-indicatorForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-labelForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listboxForwarded from the select an enum cell opens in: its list.editor-listbox-emptyForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listbox-errorForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listbox-feedbackForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listbox-filter-iconForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-filter-markForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-hintForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listbox-itemsForwarded from the select an enum cell opens in: the options in its list.editor-listbox-labelForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listbox-liveForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listbox-loadingForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listbox-searchForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-search-fieldForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-voiceForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-voice-levelForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-voice-level-canvasForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-voice-listeningForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-voice-statusForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-liveForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-surfaceForwarded from the select an enum cell opens in: the panel its list opens in.editor-triggerForwarded from the select an enum cell opens in: the button that opens its list.editor-valueForwarded from the select an enum cell opens in: the value it shows.editsThe bar under the grid that saves or discards the unsaved changes, under batch-edits.edits-countSays how many changes are unsaved.edits-discardThe button that drops every unsaved change.edits-saveThe button that saves every unsaved change.emptyShown when there are no rows, because none arrived or the filter matches none. While rows are loading, the loading part is shown in its place.errorShown after the rows while error-text is set, in place of the empty and loading lines.footerThe region below the grid.grip-headThe heading over the row grips, with reorderable-rows.headThe row that holds the column headings. It is display: contents, so it takes no space.liveA copy of the empty and loading messages, which screen readers announce when they change. Visually hidden in the styled tier.loadingShown while the rows are loading.menu-backForwarded from the column's menu, on the column. Not shown in the table, whose menu has no submenu.menu-back-markForwarded from the column's menu, on the column. Not shown in the table, whose menu has no submenu.menu-dividerThe line between groups of rows in a column's menu, on the column.menu-divider-contentForwarded from the divider, on the column. Not shown in the table.menu-divider-lineThe line inside menu-divider, on the column.menu-emptyForwarded from the column's menu, on the column. Not shown in the table, whose menu always has a row.menu-entryOne row of a column's menu, on the column.menu-entry-endThe trailing column of a row in a column's menu, on the column.menu-entry-itemThe row inside menu-entry, on the column.menu-entry-markThe check mark on the sort row that is current, on the column.menu-entry-shortcutForwarded from the row, on the column. Not shown in the table.menu-entry-shortcut-kbdForwarded from the row, on the column. Not shown in the table.menu-entry-shortcut-keyForwarded from the row, on the column. Not shown in the table.menu-entry-shortcut-separatorForwarded from the row, on the column. Not shown in the table.menu-entry-startThe leading column of a row in a column's menu, on the column.menu-entry-surfaceForwarded from the row, on the column. Not shown in the table.menu-headerForwarded from the column's menu, on the column. Not shown in the table, whose menu has no submenu.menu-highlightForwarded from the menu: the wash on the row with focus, which glides from row to row.menu-liveForwarded from the column's menu, on the column. Not shown in the table, whose menu has no loading or empty text.menu-loadingForwarded from the column's menu, on the column. Not shown in the table.menu-search-fieldForwarded from the column's menu, on the column. Not shown in the table.menu-surfaceThe panel a column's menu opens in, on the column: helix-table-column::part(menu-surface).menu-titleForwarded from the column's menu, on the column. Not shown in the table, whose menu has no submenu.moreThe row after the last one that holds the button for more rows, while load-more is set.more-buttonThe button that asks for more rows.more-cellThe cell of the more row, which spans every column.paginationThe built-in pagination, when it is shown.pagination-firstThe pagination's button that goes to the first page, shown with ends.pagination-gapThe pagination's marker for pages that are not shown.pagination-indicatorThe pagination's mark that moves to the page you are on.pagination-itemOne item in the pagination's list, holding a page or a gap.pagination-lastThe pagination's button that goes to the last page, shown with ends.pagination-listThe pagination's list of pages.pagination-liveThe region that announces a page change. It is clipped out of sight and still read by screen readers.pagination-markThe icon on the first, previous, next, and last buttons.pagination-nextThe pagination's button that goes forward one page.pagination-pageThe pagination's button for one page.pagination-page-currentAdded to pagination-page for the current page.pagination-previousThe pagination's button that goes back one page.pagination-statusThe pagination's text that says which page is shown, in compact.rowOne row of data.row-draggingAdded to row while it is being moved.row-drop-afterAdded to row when the row being moved goes after it.row-drop-beforeAdded to row when the row being moved goes before it.row-gripThe cell that holds a row's grip, with reorderable-rows.row-grip-buttonThe button that moves a row.row-grip-markThe icon on a row's grip.row-lastAdded to row on the page's last row, where nothing follows it: never under windowed, nor above the load-more row.selectThe cell that holds a row's checkbox.select-allThe heading that holds the checkbox that selects every row.select-selectedAdded to select in a selected row.tableThe grid.toggleThe mark in a row header that a press opens and closes its row by, in a tree grid.toggle-markThe caret in toggle. It points along the line while the row is closed and down while it is open.toggle-openAdded to toggle while its row is open.toolbarThe region above the grid.
CSS PropertyDescription--data-table-bleedHow far a row's fill reaches past its words with bleed. Defaults to --helix-space-row-bleed, which follows the density.--data-table-block-sizeThe height of the scrolling box while windowed. Ignored otherwise, where the grid is as tall as its rows. It is a fixed height, so a short result keeps the full box with space below it.--data-table-cell-alignThe alignment of the cell's column: start, center, or end. Unset when the column sets none. The component writes it on each cell it draws, and the stylesheet reads it. Table sets --table-cell-align for the same purpose.--data-table-cell-block-alignWhere a cell's content sits from top to bottom in a row taller than it: start, center or end. center by default. Set it on the table, or on a row through ::part(row); a column's vertical-align writes it on each of that column's cells, and wins.--data-table-colorThe text color of a cell.--data-table-columnsThe grid track list for the columns. It overrides the list worked out from the columns.--data-table-drag-preview-background-colorThe fill behind the copy of a row a pointer drags.--data-table-drag-preview-border-colorThe color of the edge around the copy of a row a pointer drags.--data-table-drag-preview-border-widthThe width of the edge around the copy of a row a pointer drags. None by default, where the shadow lifts it.--data-table-drag-preview-opacityThe opacity of the copy of a row a pointer drags.--data-table-drag-preview-radiusThe corner radius of the copy of a row a pointer drags.--data-table-drag-preview-shadowThe shadow that raises the copy of a row a pointer drags over the page.--data-table-dragging-opacityThe opacity of a row being moved, with reorderable-rows.--data-table-drop-indicator-colorThe color of the line where a moved row would land.--data-table-drop-indicator-sizeThe thickness of the line where a moved row would land.--data-table-editable-hover-background-colorThe fill of an editable cell under the pointer. The well by default.--data-table-editing-background-colorThe ground under an open cell's field, which covers the cell beside it where the field needs more room than its column. The page's background by default.--data-table-error-colorThe color of the words in the line shown while error-text is set.--data-table-flash-colorThe wash a row takes when it changes, with flash-changes, at its strongest. Defaults to --helix-color-info at 14 percent in light mode and 22 in dark.--data-table-footer-gapThe space between the grid and the footer below it.--data-table-footer-item-gapThe space between the pieces of the footer, such as a summary and the pagination.--data-table-grip-colorThe color of a row's grip, with reorderable-rows.--data-table-grip-disabled-opacityThe opacity of a row's grip while a sort decides the order.--data-table-heading-background-colorThe fill behind a heading while windowed. It is opaque, because rows scroll under the sticky heading. Unset otherwise.--data-table-heading-colorThe text color of a heading.--data-table-indentHow far a tree grid's row header steps in for each level. It defaults to the width of the mark that opens a row.--data-table-levelHow deep a row is in a tree grid, from 1. The component writes it on each row header cell, and the stylesheet indents by it.--data-table-message-border-colorThe edge of the message under a cell whose value a rule refused. The danger color by default.--data-table-message-border-widthThe width of that message's edge.--data-table-message-shadowThe shadow under that message.--data-table-more-border-colorThe color of the edge around the button in the load-more row.--data-table-more-hover-background-colorThe fill behind the button in the load-more row while the pointer is over it.--data-table-more-padding-blockThe space above and below the words of the button in the load-more row.--data-table-more-padding-inlineThe space either side of the words of the button in the load-more row.--data-table-more-radiusThe corner radius of the button in the load-more row.--data-table-move-durationHow long a row takes to slide to its new place, or to fade in. Defaults to --helix-duration-normal. 0ms moves nothing.--data-table-move-easingThe curve a row slides and fades in along. Defaults to --helix-easing-standard.--data-table-padding-blockThe space above and below a cell's content.--data-table-padding-inlineThe space on either side of a cell's content.--data-table-pin-offsetHow far a pinned column's cell stays from its end of the row, in pixels: the width of the pinned columns before it. The component writes it on each cell of a pinned column, and the stylesheet reads it.--data-table-pinned-background-colorThe fill behind a pinned column's cells, which covers the cells that scroll under them. The page's background by default.--data-table-row-background-colorThe fill across a row. A row generates no box, so a ::part(row) rule sets this for its cells, as ::part(row):hover does for a hover.--data-table-row-hover-background-colorThe fill across a row while the pointer is over it.--data-table-rule-colorThe color of the line between rows. It takes a color only, because it fills the color in a border shorthand, and a full border value makes the rule invalid. It is drawn on the cells, because the row is display: contents.--data-table-selected-background-colorThe fill across a selected row.--data-table-templateThe column track list, worked out from the columns. The component writes it inline on the element that reads it, so setting it has no effect. Set a column's width to change it.--data-table-textThe font size of headings and cells.--data-table-toggle-colorThe color of the mark that opens and closes a row of a tree grid.--data-table-toggle-gapThe space between the mark that opens a row of a tree grid and the row's name, also kept by a row with no children.--data-table-toggle-sizeThe size of the mark that opens and closes a row of a tree grid, and of the room a row with no children keeps for it.--data-table-toolbar-gapThe space between the toolbar and the grid below it.--data-table-unsaved-background-colorThe fill of a cell whose change is held unsaved, under batch-edits.
Custom stateDescriptionemptyWhile there are no rows to show and none are loading.errorWhile error-text is set.loadingWhile loading is set, as the rows are on their way.settledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
Roothelix-headless-data-tableA table drawn from an array of rows, with sorting, filtering, and paging.
PropTypeDescriptionascendingLabelstringDefault"ascending"The word for an ascending sort, in a sorted-label that writes {order}.batchEditsbooleanDefaultfalseHolds each saved cell as an unsaved change, marked in its corner, and
draws a bar under the grid that saves or discards every one at once.
Off, a cell saves as you leave it.canceledLabelstringDefault"Canceled"What screen readers hear when a held row is put back, or a move is
refused, with reorderable-rows.cellStylesCSSStyleSheet[]Default[]Style sheets for the markup a column's cell returns, which renders in this
shadow root, where your document's rules stop.childFieldstringThe field that holds a row's child rows, as an array. Set it, and row-key,
and the grid becomes a tree grid.columnsstringDefault""The column tracks, as a grid track list such as 2fr 1fr max-content,
dealt out one track to a column in the order the columns are written. A
column's own width wins in its place, and a column it does not reach
takes the track a column with no width takes.defaultExpandedstringDefault""The keys of the rows open at the start, separated by commas. Used until
expanded is set.defaultFilterstringDefault""The starting search query, used until filter is set.defaultOrderstringDefault""The starting column order, used until order is set.defaultPagenumberDefault1The starting page, used until page is set.defaultPageSizenumberDefault0The starting page size, used until pageSize is set.defaultSelectedstringDefault""The keys selected at the start, separated by commas. Used until selected
is set.defaultSortstringDefault""The starting sort order, used until sort is set.defaultViewstringDefault""The starting view, as JSON, such as {"sort":"due:asc","columns":{"hidden":["notes"]}}.
The parts it names are put in force once, before the table first draws,
and view holds them after.descendingLabelstringDefault"descending"The word for a descending sort, in a sorted-label that writes {order}.discardEditsLabelstringDefault"Discard"The words on the bar's button that discards the unsaved changes, with batch-edits.droppedLabelstringDefault"Dropped"What screen readers hear when a row is dropped, with reorderable-rows.editOn"click"|"double-click"Default"click"What opens an editable cell that draws no field at rest, because its
column sets cell or editor: click, where a single press opens it, or
double-click, a spreadsheet's way. Every other editable cell is its
field already, which a press reaches. Enter, F2, and typing open a cell
either way, and a boolean cell toggles on one press whatever this says.emptyTextstringDefault"Nothing to show"The text shown and announced when there are no rows and none are loading.errorTextstringDefault""The text shown and announced when the rows could not load, such as "The
files did not load". Set it when a fetch fails, and clear it once you try
again. Empty, the default, shows nothing.estimatenumberDefault32The estimated height of a row before it is drawn, in pixels.expandedstringThe keys of the open rows in a tree grid, separated by commas, the shape of
selected. A reader's press writes it and then sends helix-expand.filterstringThe search query. A row is shown when the query matches any of its columns.flashChangesbooleanDefaultfalseLights up a row whose data changes, and a row that arrives in rows after
the table has drawn, so you see what live data or an agent changed. Wants
row-key, which is how a row is known across the change.gapLabelstringDefault"Skip to page {page}"The built-in pagination's name for a gap in its run of pages. {page} is
replaced with the page it jumps to.hideColumnLabelstringDefault"Hide column"The name of the row in a column's menu that hides the column.labelstringDefault""The grid's name, read by screen readers.loadingbooleanDefaultfalseWhether the rows are still loading.loadingTextstringDefault"Loading"The text shown and announced while the rows load.loadMorebooleanDefaultfalseDraws a row after the last one with a button that asks for more rows.loadMoreLabelstringDefault"Load more"The words on the button in the more row.localestringDefault""The locale the words, plural forms, and numbers are in, as a BCP 47 tag
such as pl. Empty reads the nearest lang, then the browser's
language. The built-in pagination speaks it too.maxMessagestringDefault"Enter {max} or less."The message for an edited cell over its column's max. {max} is the largest value.minMessagestringDefault"Enter {min} or more."The message for an edited cell under its column's min. {min} is the smallest value.mode"client"|"server"Default"client"Where filtering, sorting, and paging happen. client does them in the
table, and server leaves them to your code.movedLabelstringDefault"{name} moved to position {position} of {count}"What screen readers hear each time a key moves a held row, with
reorderable-rows. {name} is the row's name, {position} the place it
would go, counting from 1, and {count} the number of rows on the page.moveLeftLabelstringDefault"Move left"The name of the row in a column's menu that moves the column left.moveRightLabelstringDefault"Move right"The name of the row in a column's menu that moves the column right.moveRowLabelstringDefault"Move {row}"The name of a row's grip, with reorderable-rows. {row} is replaced with
the row's name.nextLabelstringDefault"Next page"The built-in pagination's name for the button that moves forward a page.numberMessagestringDefault"Enter a number."The message for an edited number cell that holds something other than a number.orderstringThe column order, as field names separated by spaces.pagenumberThe page shown, counting from 1.pageLabelstringDefault"Page {page}"The built-in pagination's name for one page. {page} and {pages} are
replaced with the page number and the page count.pageSizenumberThe number of rows on a page. 0 shows every row, with no paging.paginatedbooleanShows a pagination under the grid.paginationLabelstringDefault"Pagination"The name of the built-in pagination's navigation landmark.patternMessagestringDefault"Enter a value in the form this column takes."The message for an edited cell that does not match its column's pattern.pickedUpLabelstringDefault"Picked up {name}"What screen readers hear when a key or a click picks up a row, with
reorderable-rows. {name} is the row's name.previousLabelstringDefault"Previous page"The built-in pagination's name for the button that moves back a page.reorderablebooleanDefaultfalseLets users reorder the columns.reorderableRowsbooleanDefaultfalseLets people move rows, by a grip that leads each row. The table moves no
row itself: set rows to the order helix-reorder carries.requiredMessagestringDefault"Enter a value."The message for an edited required cell left empty.resultLabelstringWhat screen readers hear when a search leaves one row, where
results-label should not say it. {count} is the count.resultsLabelstringDefault"{count} of {total, plural, one {# row} other {# rows}}"What screen readers hear when a search or a filter narrows the rows.
{count} is how many rows are left and {total} how many there are,
written in the locale, and each language writes the forms it has:
{count} z {total, plural, one {# wiersza} other {# wierszy}}.rowGripsLabelstringDefault"Move rows"The name of the heading over the row grips, with reorderable-rows.rowKeystringDefault""The field that identifies each row.rowLinkbooleanWhether a press on a row works the first link or button in its cells.rowParts(row: DataRow, index: number) => stringReturns part names to add to a row, for a row that marks itself, such as
blocked, or every second row.rowsreadonlyDataRow[]Default[]Every row of the result, in the order it arrived.saveEditsLabelstringDefault"Save"The words on the bar's button that saves the unsaved changes, with batch-edits.savingLabelstringDefault"Saving"What a screen reader hears beside a cell that is saving.selectablebooleanDefaultfalseAdds a column of checkboxes for selecting rows.selectAllLabelstringDefault"Select every row"The name of the checkbox in the heading that selects every row.selectedstringThe keys of the selected rows, separated by commas.selectedLabelstringDefault"{count} selected"What screen readers hear when the chosen rows change. {count} is how many
rows are chosen, written in the locale, and a language that needs plural
forms writes them: {count, plural, one {# wybrany} few {# wybrane} many {# wybranych} other {# wybranego}}.selectionBehavior"replace"|"toggle"Default"toggle"What a key or a press on a row does to the rows already selected, in a
selectable table. toggle, the default, keeps them: Space adds or takes
out the row. replace selects the row alone, as a file list does: Down and
Up carry the selection with them, and a press on a row selects it. Control
or Command with a press or Space adds or takes out one row, and with a move
goes without selecting. The checkboxes add or take out one row either way.selectRowLabelstringDefault"Select {row}"The name of a row's checkbox. {row} is replaced with the row's value in
the first column that has a field, or with its key.showColumnsLabelstringDefault"Show hidden columns"The name of the row in a column's menu that brings back the columns it hid.sortstringThe sort order, as field:direction.sortAscendingLabelstringDefault"Sort ascending"The name of the row in a column's menu that sorts smallest first.sortDescendingLabelstringDefault"Sort descending"The name of the row in a column's menu that sorts largest first.sortedLabelstringDefault"{direction, select, ascending {Sorted by {column}, ascending} descending {Sorted by {column}, descending} other {Sorted by {column}}}"What screen readers hear when the table is sorted. {column} is the
column's heading and {direction} is ascending or descending, so each
order has its whole sentence. {order} is the deprecated
ascending-label or descending-label.totalnumberDefault0The number of rows in the whole result, for when the table cannot count
them.unsavedLabelstringDefault"{count, plural, one {# unsaved change} other {# unsaved changes}}"What the bar says, with batch-edits. {count} is how many changes are unsaved.unsortedLabelstringDefault"Not sorted"What screen readers hear when the table stops being sorted.viewDataTableViewEverything a reader can change about how the rows are shown, as one value:
the search in query, the column filters, the sort, the columns'
order, hidden fields, pinned ends and widths, and the pageSize.windowedbooleanDefaultfalseDraws only the rows in view, with empty space in place of the rest.xlsx((data: ExportData) => Uint8Array)A function that writes an XLSX file, which @fusion.dev/helix/data-table/xlsx
exports as toXlsx. Set it to offer XLSX in download and in a bound
TableExport. It is its own entry, so a table that never writes a
spreadsheet does not carry the writer.
ReadTypeDescriptiondroppedFieldsstring[]The fields of the columns left out at the table's width, for their min-table-width.everyRowCountnumberEvery row before the search and the filters narrow them: the rows the
table holds, or total in server mode.matchednumberHow many rows match the filter, across every page.orderedColumnsHelixHeadlessTableColumn[]The columns in their current order.tableColumnsHelixHeadlessTableColumn[]The columns declared as children, in the order they are written.unsavedCountnumberHow many changes are held unsaved, under batch-edits.whenSettledPromise<void>Resolves a frame after the first update, when transitions are switched on.
SlotDescription(default)The columns, as TableColumn elements, and the first page served as TableRow elements, which show until rows holds a row.emptyContent shown when there are no rows to show and none are loading, such as a picture and a link. Falls back to empty-text, which the live region still says.errorContent shown after error-text while it is set, such as a button that tries again.footerContent below the grid. It replaces the built-in pagination.loadingContent shown while the rows load, such as a spinner. Falls back to loading-text, which the live region still says.selectionContent that takes the toolbar's place while rows are selected, such as a SelectionBar with what you can do to them.toolbarContent above the grid, such as a search field or actions.
EventTypeDescriptionhelix-before-cell-commitHelixBeforeCellCommitEventA cell's new value is about to be saved. Cancelable: cancel it to keep the old value, or pass a check to detail.waitUntil.helix-before-cell-editHelixBeforeCellEditEventA cell is about to open for an edit. Cancelable: cancel it to keep the cell closed.helix-before-column-toggleHelixBeforeColumnToggleEventA column is about to be hidden or shown, with its field and hidden. Cancelable: cancel it to keep the column as it is.helix-before-exportHelixBeforeExportEventA file of the rows is about to be made, from Export or download, with the choices, the file's name, and the view. Cancelable: cancel it to make the file on your server.helix-before-filterHelixBeforeFilterEventThe search query is about to change. Cancelable: cancel it to keep the current query.helix-before-followHelixBeforeFollowEventA press on a link in a cell is about to load its page, in this tab and on this site. Cancelable: cancel it to keep the page, and hand detail.href to your router.helix-before-navigateHelixBeforeNavigateEventAnother page was requested. Cancelable: cancel it to stay on the current page.helix-before-reorderHelixBeforeReorderEventA row or a column is about to move. For a row, with reorderable-rows, the event carries every row's key in the new order; for a column, kind is column and value holds every field in the new order. Cancelable: cancel it to keep the row or the column where it is.helix-before-selectHelixBeforeSelectEventThe selection is about to change. The event carries every selected key, separated by commas. Cancelable: cancel it to keep the current selection.helix-before-sortHelixBeforeSortEventA different sort order was requested. Cancelable: cancel it to keep the current order.helix-before-view-changeHelixBeforeViewChangeEventThe view is about to change, with the whole view it would leave in detail.view and as JSON in detail.value. Sent before the event for the part that changes. Cancelable: cancel it to keep the view, and set view, rows and total from your server.helix-cell-commitHelixCellCommitEventFired after a cell's new value is saved into a copy of its row in rows.helix-cell-editHelixCellEditEventFired after a cell opens for an edit.helix-column-toggleHelixColumnToggleEventFired after a column is hidden or shown, with its field and hidden.helix-expandHelixExpandEventFired after a row opens or closes, with every open row's key, separated by commas, which expanded also holds.helix-exportHelixExportEventFired as the browser saves a file of the rows, with the same detail.helix-filterHelixFilterEventFired after the search query changes, with the new query.helix-followHelixFollowEventFired as the browser loads the page a link in a cell names, with its path.helix-load-moreHelixLoadMoreEventFired when a reader asks for more rows, by the load-more row's button or by scrolling a windowed table near its end.helix-navigateHelixNavigateEventFired after the page changes, with the new page in detail.page and as a string in detail.value.helix-reorderHelixReorderEventFired after the columns move, with kind set to column and every field in the new order. For a row, with kind set to row, it follows helix-before-reorder, and you set rows to the order in keys.helix-selectHelixSelectEventFired after the selection changes, with every selected key, separated by commas.helix-sortHelixSortEventFired after the sort order changes, with the new order.helix-view-changeHelixViewChangeEventFired after the view changes, with the whole view in detail.view and as JSON in detail.value.
MethodTypeDescriptioncancelEdit() => voidCloses the open cell and puts its old value back, as Escape does.commitEdit(rows: unknown, columns: unknown, refocus: unknown) => Promise<boolean>Saves the open cell, as Enter, Tab or leaving it does, and moves the tab
stop by rows and columns. Checks required, min, max, pattern
and validate, asks with helix-before-cell-commit, waits on any check
its listener passed to waitUntil, then writes the value into a copy of
the row in rows and fires helix-cell-commit. Under batch-edits the
value is held as an unsaved change. Returns whether the value was saved.countView(part: PartialView) => number | undefinedHow many rows a view would show, counted from the rows the table holds:
the view with the parts of part laid over it, the way requestView lays
them. Quick Filters counts each preset with it. Nothing in server mode,
where the table holds one page, and in a tree grid.csv() => stringReturns the result as CSV: every row that matches the filter, in the order
and columns shown, under a line of the column headings.discardEdits() => voidDrops every unsaved change, as the bar's Discard does, under batch-edits.download(options: ExportOptions & { filename?: string }) => booleanSaves an export as a file, as a reader's Export does.editCell(row: DataRow, field: string, typed: string) => booleanOpens a cell for an edit, as Enter, F2, a double click or typing does.
Asks first with helix-before-cell-edit. typed starts the field with
those characters in place of the value. Returns whether the cell opened.exportData(options: ExportOptions) => ExportDataThe rows and columns an export holds, before they are written: the
headings, the fields, and each row's values.exportRows(options: ExportOptions) => stringWrites an export as text: CSV by default, or TSV or JSON with format.
See exportData for the rows, columns and values. XLSX is a file and not
text, which download writes.facetsOf(field: string) => Facet[]Every value a column holds, with how many rows hold each, most first.hideColumn(field: string) => booleanHides a column, as Hide column in its menu does.operatorsOf(field: string) => readonlyFilterOperatorInfo[]The comparisons a column's filter offers, for its type. Your own filter
picker can list them.pinOf(field: string) => PinEdge | undefinedWhich end a column is pinned to, if it is.requestView(next: PartialView) => booleanAsks for a different view, as a reader's change does: helix-before-view-change,
which can refuse it, then helix-view-change. The parts next names
replace those parts, whole, and the rest stay, so a preset can name only
its filters. Returns whether the view changed.saveEdits() => voidWrites every unsaved change into rows, as the bar's Save does, under batch-edits.search(query: string) => booleanFilters the rows by a query from your own search field.selectRows(keys: readonlystring[]) => booleanSelects these rows by key, and no others, as a reader's choice does: it
asks with helix-before-select. An empty list clears the selection, which
Clear in a SelectionBar does. Returns whether the selection changed.showColumn(field: string) => booleanShows a hidden column. Asks with helix-before-column-toggle, and returns
whether the column was shown.toggleSort(field: string) => booleanCycles the sort order of one column, as a click on its heading does.
PartDescriptionafterThe space that stands in for the rows below the window. Only while windowed.beforeThe space that stands in for the rows above the window. Only while windowed.cellOne cell.cell-booleanAdded to cell in an editable boolean column, which holds a checkbox that toggles in place.cell-editableAdded to cell in a column a reader can edit.cell-editingAdded to cell while it is open for an edit.cell-fieldAdded to cell in an editable column that draws its field at rest, as every one does that has no cell or editor of its own.cell-headerAdded to cell for a cell of the row header column.cell-invalidAdded to cell while its value breaks a rule, beside cell-message.cell-messageThe message for a value a rule refuses, inside the open cell. The field names it as its description.cell-pinned-endAdded to cell in a column the view pins to the end of the row.cell-pinned-startAdded to cell in a column the view pins to the start of the row.cell-savingAdded to cell while a check the page passed to waitUntil is under way.cell-saving-markSays a cell is saving, inside it. Read by a screen reader, and drawn as a mark in the styled tier.cell-selectedAdded to cell in a selected row.cell-unsavedAdded to cell while its change is held unsaved, under batch-edits.checkboxA row's checkbox, or the checkbox in the heading that selects every row.checkbox-boxThe box drawn for the checkbox's input.checkbox-controlThe checkbox's input.checkbox-feedbackForwarded from the checkbox. Not shown in the table.checkbox-fieldThe row that holds the checkbox's box.checkbox-hintForwarded from the checkbox. Not shown in the table.checkbox-labelForwarded from the checkbox. The label is read by screen readers only.checkbox-markThe check mark, or the dash while some rows are selected.checkbox-mark-checkedAdded to checkbox-mark while its box is checked.checkbox-mark-dashAdded to checkbox-mark while it draws the dash, which it keeps until its box is checked.checkbox-mark-indeterminateAdded to checkbox-mark while only some rows are selected.drag-previewA copy of the row a pointer drags by its grip, which follows the pointer in the top layer until the row is let go, with reorderable-rows. A column's grip moves the column itself. Hidden from assistive technology.editorThe field an open cell edits in: an Input, a NumberInput, a DateInput, or a Select, as the column's type picks.editor-feedbackForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-hintForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-indicatorForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-labelForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listboxForwarded from the select an enum cell opens in: its list.editor-listbox-emptyForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listbox-errorForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listbox-feedbackForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listbox-filter-iconForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-filter-markForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-hintForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listbox-itemsForwarded from the select an enum cell opens in: the options in its list.editor-listbox-labelForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listbox-liveForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listbox-loadingForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-listbox-searchForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-search-fieldForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-voiceForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-voice-levelForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-voice-level-canvasForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-voice-listeningForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-listbox-voice-statusForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no search or voice.editor-liveForwarded from the select an enum cell opens in. Not shown in the cell, whose select has no label, hint, search, or voice.editor-surfaceForwarded from the select an enum cell opens in: the panel its list opens in.editor-triggerForwarded from the select an enum cell opens in: the button that opens its list.editor-valueForwarded from the select an enum cell opens in: the value it shows.editsThe bar under the grid that saves or discards the unsaved changes, under batch-edits.edits-countSays how many changes are unsaved.edits-discardThe button that drops every unsaved change.edits-saveThe button that saves every unsaved change.emptyShown when there are no rows, because none arrived or the filter matches none. While rows are loading, the loading part is shown in its place.errorShown after the rows while error-text is set, in place of the empty and loading lines.footerThe region below the grid.grip-headThe heading over the row grips, with reorderable-rows.headThe row that holds the column headings. It is display: contents, so it takes no space.liveA copy of the empty and loading messages, which screen readers announce when they change. Visually hidden in the styled tier.loadingShown while the rows are loading.menu-backForwarded from the column's menu, on the column. Not shown in the table, whose menu has no submenu.menu-back-markForwarded from the column's menu, on the column. Not shown in the table, whose menu has no submenu.menu-dividerThe line between groups of rows in a column's menu, on the column.menu-divider-contentForwarded from the divider, on the column. Not shown in the table.menu-divider-lineThe line inside menu-divider, on the column.menu-emptyForwarded from the column's menu, on the column. Not shown in the table, whose menu always has a row.menu-entryOne row of a column's menu, on the column.menu-entry-endThe trailing column of a row in a column's menu, on the column.menu-entry-itemThe row inside menu-entry, on the column.menu-entry-markThe check mark on the sort row that is current, on the column.menu-entry-shortcutForwarded from the row, on the column. Not shown in the table.menu-entry-shortcut-kbdForwarded from the row, on the column. Not shown in the table.menu-entry-shortcut-keyForwarded from the row, on the column. Not shown in the table.menu-entry-shortcut-separatorForwarded from the row, on the column. Not shown in the table.menu-entry-startThe leading column of a row in a column's menu, on the column.menu-entry-surfaceForwarded from the row, on the column. Not shown in the table.menu-headerForwarded from the column's menu, on the column. Not shown in the table, whose menu has no submenu.menu-highlightForwarded from the menu: the wash on the row with focus, which glides from row to row.menu-liveForwarded from the column's menu, on the column. Not shown in the table, whose menu has no loading or empty text.menu-loadingForwarded from the column's menu, on the column. Not shown in the table.menu-search-fieldForwarded from the column's menu, on the column. Not shown in the table.menu-surfaceThe panel a column's menu opens in, on the column: helix-table-column::part(menu-surface).menu-titleForwarded from the column's menu, on the column. Not shown in the table, whose menu has no submenu.moreThe row after the last one that holds the button for more rows, while load-more is set.more-buttonThe button that asks for more rows.more-cellThe cell of the more row, which spans every column.paginationThe built-in pagination, when it is shown.pagination-firstThe pagination's button that goes to the first page, shown with ends.pagination-gapThe pagination's marker for pages that are not shown.pagination-indicatorThe pagination's mark that moves to the page you are on.pagination-itemOne item in the pagination's list, holding a page or a gap.pagination-lastThe pagination's button that goes to the last page, shown with ends.pagination-listThe pagination's list of pages.pagination-liveThe region that announces a page change. It is clipped out of sight and still read by screen readers.pagination-markThe icon on the first, previous, next, and last buttons.pagination-nextThe pagination's button that goes forward one page.pagination-pageThe pagination's button for one page.pagination-page-currentAdded to pagination-page for the current page.pagination-previousThe pagination's button that goes back one page.pagination-statusThe pagination's text that says which page is shown, in compact.rowOne row of data.row-draggingAdded to row while it is being moved.row-drop-afterAdded to row when the row being moved goes after it.row-drop-beforeAdded to row when the row being moved goes before it.row-gripThe cell that holds a row's grip, with reorderable-rows.row-grip-buttonThe button that moves a row.row-grip-markThe icon on a row's grip.row-lastAdded to row on the page's last row, where nothing follows it: never under windowed, nor above the load-more row.selectThe cell that holds a row's checkbox.select-allThe heading that holds the checkbox that selects every row.select-selectedAdded to select in a selected row.tableThe grid. While windowed, the box that scrolls, which needs only a block size on this tier.toggleThe mark in a row header that a press opens and closes its row by, in a tree grid.toggle-markThe caret in toggle. It points along the line while the row is closed and down while it is open.toggle-openAdded to toggle while its row is open.toolbarThe region above the grid.
CSS PropertyDescription--data-table-cell-alignThe alignment of the cell's column: start, center, or end. Unset when the column sets none. The component writes it on each cell it draws, and the stylesheet reads it. Table sets --table-cell-align for the same purpose.--data-table-cell-block-alignWhere a cell's content sits from top to bottom in a row taller than it: start, center or end. center by default. Set it on the table, or on a row through ::part(row); a column's vertical-align writes it on each of that column's cells, and wins.--data-table-flash-colorThe wash a row takes when it changes, with flash-changes, at its strongest. Unset, the info color at 14 percent in light mode and 22 in dark.--data-table-levelHow deep a row is in a tree grid, from 1. The component writes it on each row header cell, and the stylesheet indents by it.--data-table-move-durationHow long a row takes to slide to its new place, or to fade in. Unset, nothing moves.--data-table-move-easingThe curve a row slides and fades in along.--data-table-pin-offsetHow far a pinned column's cell stays from its end of the row, in pixels: the width of the pinned columns before it. The component writes it on each cell of a pinned column, and the stylesheet reads it.--data-table-templateThe column track list, worked out from the columns. The component writes it inline on the element that reads it, so setting it has no effect. Set a column's width to change it.
Custom stateDescriptionemptyWhile there are no rows to show and none are loading.errorWhile error-text is set.loadingWhile loading is set, as the rows are on their way.settledSet one frame after the first render. Transitions wait for it, so an element does not animate its own arrival.
Examples
NameDescriptionAligned cellsA row whose grip, link and tag are taller than its text, with every cell's content centered on the row.BleedA table under a heading and a divider, its words and headings on their column and the selected row's fill reaching past it.Bleed insetA table in a card with an inset bleed: the chosen rows a rounded fill kept off the rules, as a menu draws its highlight.Column menuA menu on each heading that sorts, moves, and hides the column. A press on the rest of the heading still sorts.EditingAn invoice table whose owner, amount, due date, and paid columns a reader can edit in place, with an amount that may not go under zero.EventsThe sort, filter, and page notifications the table sends once each change stands.Live updatesRows that light up when live data changes them, with a button that refreshes the latencies.Loading moreSix rows at first, with a row after them that loads six more each time it is pressed.Moving rowsRows you move by a grip, with the new order set back on the table.Narrow columnsColumns that drop out as the table narrows, the least needed first.Nested rowsA file tree as a table: folders open and close in place, and their files sit under them.PreviewA table that sorts when you click a heading, with pages for the rest of the rows.PreviewA table that sorts when you click a heading, with pages for the rest of the rows.SearchingOne query matched against every column, from your own search field.Selecting and arrangingRows selected by their key, and columns you can reorder and resize.Serving the first pageThe first page written out as rows, so the HTML carries the values before the table draws its own.SortingRows that slide to their new places when a heading sorts them, and columns that slide when you move one.StatesA table while its rows load, and a table with no rows, each with its own words.Summary and sizeA summary of the rows shown and a page size menu, on either side of the built-in pagination.Windowed pagingPages of five hundred rows, with only the rows in view drawn.WindowingFive thousand rows, with only the rows in view drawn.