Skip to content
Velkin LogoVelkin Logo
Velkin
VELKIN/UI

Modern UI components for product teams and their AI agents. Lit core, typed wrappers, live MCP.

sales@velkinui.com

Product

  • Docs
  • Components
  • Studio
  • Pricing

Resources

  • Quick start
  • Blog
  • Changelog
  • Roadmap
  • Status

Project

  • About
  • Contact
  • License
  • Privacy
  • Terms

© 2026 Velkin. MIT core · Pro licenses available.

VELKIN

Data Table

Pro

A data table component with sorting, filtering, and selection.

vu-data-table · @velkin/react-pro/data-table

Copy page

Import

React
npm i @velkin/react-pro

import { LicenseInfo } from "@velkin/license";
// Vite: import.meta.env.VITE_VELKIN_LICENSE_KEY
// Next: process.env.NEXT_PUBLIC_VELKIN_LICENSE_KEY
LicenseInfo.setLicenseKey(import.meta.env.VITE_VELKIN_LICENSE_KEY ?? process.env.NEXT_PUBLIC_VELKIN_LICENSE_KEY ?? "");

// @velkin-pro
import { VuDataTable } from "@velkin/react-pro/data-table";

Examples

API

Props

PropTypeDefaultDescription
columnsTableColumnDef[][]Column tree with optional nested headers. Default: `[]`.
defaultColumnDefTableDefaultColumnDef{}Defaults merged into every column. Default: `{}`.
rowDataTableRow[][]Row records; each row requires a string id. Default: `[]`.
dataProvidernull | TableDataProvidernullAlternate row source via `fetch`. Client ops by default; `serverSideOperations: true` for SSRM. Default: `null`.
lazyColumnsbooleanfalseWith `dataProvider`, request in-view (+ pinned/sort/filter/group) column keys. Default: `false`.
rowKeystring"id"Field used as the stable row id. Default: `"id"`.
showIndexColumnbooleanfalseSynthetic 1-based row-index column pinned left. Default: `false`.
defaultExpandedGroupLevelsnull | numbernullAuto-collapse groups deeper than this; `null` keeps all expanded. Default: `null`.
singleExpandedRowbooleanfalseAccordion expand — only one data row open. Default: `false`.
cellSelectionbooleanfalseClick/drag cell range selection and copy. Default: `false`.
keyboardNavigationbooleanfalseArrow/Tab/Home-style active cell; typeahead jump when `cellEditing` is off. Default: `false`.
cellEditingbooleanfalseIn-cell edit (F2, Enter, type-to-replace). Printable keys typeahead-jump when this is off. Default: `false`.
searchingbooleanfalseQuick-filter search bar. Default: `false`.
sortingbooleanfalseColumn header sort controls. Default: `false`.
paginationbooleanfalseFooter pagination controls. Default: `false`.
filteringbooleanfalsePer-column floating filter row. Default: `false`.
advancedFilteringbooleanfalseExpression filter bar in the header chrome. Default: `false`.
groupingbooleanfalseRow grouping with group-by chip row. Default: `false`.
columnVisibilitybooleanfalseColumns sidebar pane and header hide action. Default: `false`.
columnReorderbooleanfalseDrag-reorder leaf column headers. Default: `false`.
rowDragbooleanfalseDrag-reorder data rows. Default: `false`.
totalBarbooleanfalseFooter aggregate total bar. Default: `false`.
columnMenubooleanfalsePer-column header overflow menu. Default: `false`.
pivotbooleanfalsePivot builder in the columns sidebar. Default: `false`.
expandedRowsbooleanfalseExpandable row detail panels. Default: `false`.
gridlinesbooleanfalseShow vertical column separator lines. Default: `false`.
rowSelectionnull | { mode: TableSelectionMode; selectAll?: boolean; selectedIds?: string[]; excludedIds?: string[]; }nullSelection state; omit to disable selection UI. Default: `null`.
toneVuDataTableTone"normal"Neutral surface weight for row and header chrome. Default: `"normal"`.
sortTableSortRule[][]Controlled multi-column sort rules. Default: `[]`.
columnFiltersRecord{}Active per-column filters keyed by field. Default: `{}`.
quickFilterTextstring""Controlled quick-filter text. Default: `""`.
advancedFilterQuerystring""Controlled advanced filter expression. Default: `""`.
pagenumber1Current page index (1-based). Default: `1`.
pageSizenumber25Rows per page. Default: `25`.
pageSizeOptionsDataTablePageSizeOption[][10, 25, 50, 100, "all"]Page-size choices for the footer menu. Default: `[10, 25, 50, 100, "all"]`.
groupBystring[][]Column fields for multi-level row grouping. Default: `[]`.
collapsedGroupKeysstring[][]Collapsed group row keys. Default: `[]`.
groupColumnLabelstring"Group"Header for the auto-group column. Default: `"Group"`.
heightstring"360px"Viewport block size for the virtualized body. Default: `"360px"`.
loadingbooleanfalseShows a loading overlay over the grid viewport. Default: `false`.
rowModelTableRowModel—Row store; overrides rowData when set. `lazyRowModel()` auto-attaches `createRowIndexProvider`.
columnModelTableColumnModel—Column store; overrides columns when set.
columnWidthsRecord{}Per-column width overrides keyed by field. Default: `{}`.
columnResizebooleanfalseDrag resize handles on leaf headers. Default: `false`.
expandedRowIdsstring[][]Expanded data-row ids. Default: `[]`.
expandedRowRenderernull | (row: TableRow, context: VuDataTableExpandedRowRendererContext) => unknownnullDetail panel renderer for expanded rows. Default: `null`.
expandedRowHeightnumber120Estimated detail row block size before measurement. Default: `120`.
pivotConfignull | { rowDimensions: readonly string[]; columnDimensions: readonly string[]; values: readonly TablePivotValueField[]; }nullPivot field assignment. Default: `null`.
pivotEnabledbooleantrueRenders the pivot layout instead of the flat grid. Default: `true`.
collapsedPivotKeysstring[][]Collapsed pivot group row keys. Default: `[]`.
pivotRowSortTablePivotRowSort{}Per row-dimension pivot sort state. Default: `{}`.
pivotColumnSortDirectionTablePivotColumnSortDirection"asc"Hierarchical sort for pivot column keys. Default: `"asc"`.
aggregationstring"sum"Default numeric aggregation for group subtotals. Default: `"sum"`.
aggregatorsTableAggregatorRegistry{}Custom reducers referenced from column aggregation. Default: `{}`.
extraSidebarPanesDataTableSidebarPaneDefinition[][]Custom sidebar panes after built-in columns and filters. Default: `[]`.

Events

EventDetailDescription
vu-quick-filterVuDataTableQuickFilterDetailQuick-filter text changes.
vu-advanced-filterVuDataTableAdvancedFilterDetailAdvanced filter expression changes.
vu-sortVuDataTableSortDetailSort rule changes.
vu-pageVuDataTablePageChangeDetailPagination changes.
vu-filterVuDataTableFilterDetailColumn filter changes.
vu-selectionVuDataTableSelectionChangeDetailRow selection changes.
vu-column-widthVuDataTableColumnWidthDetailColumn width overrides.
vu-groupVuDataTableGroupDetailGroup-by or collapse changes.
vu-pivotVuDataTablePivotDetailPivot config changes.
vu-expanded-rowVuDataTableExpandedRowDetailExpanded row id changes.
vu-column-visibilityVuDataTableColumnVisibilityDetailColumn visibility changes.
vu-column-reorderVuDataTableColumnReorderDetailColumn tree reorder.
vu-row-reorderVuDataTableRowReorderDetailRow data reorder.
vu-data-provider-errorVuDataTableDataProviderErrorDetailFired when `dataProvider.fetch` (or a secondary hook) rejects.
vu-cell-selectionVuDataTableCellSelectionDetailActive cell / range selection changed.
vu-cell-changeVuDataTableCellChangeDetailA cell value was committed.

Slots

SlotDescription
header-actionsExtra controls inline at the end of the native header toolbar row.
footer-actionsExtra controls inline in the native pagination footer bar.
headerExtra banner above the grid chrome.
footerExtra banner below the pagination bar.
emptyEmpty-state content when the current view has no rows.
loadingLoading overlay content; replaces the default message.

CSS parts

PartDescription
header-chromeSearch and group-by controls above column headers.
headerColumn header scroll region.
header-cellOne header cell.
searchSearch field wrapper in the header chrome.
search-inputNative search text input.
search-clearClear-search button shown when a query is present.
advanced-filterAdvanced filter bar (`vu-advanced-filter`) in the header chrome.
advanced-filter-fieldAdvanced filter input field wrapper.
advanced-filter-inputAdvanced filter expression input.
advanced-filter-clearClear advanced filter button.
advanced-filter-builderVisual builder toggle button.
advanced-filter-suggestionsType-ahead suggestions list.
advanced-filter-popoverVisual builder popover surface.
group-byGroup-by chip row in the header chrome.
group-by-chipsActive group-by chips container; drop header columns here.
group-by-chipOne grouped column chip; drag to reorder.
group-by-chip-removeRemove button on a group-by chip.
header-actionsInline action controls in the header toolbar row.
header-menu-triggerThree-dot column menu button on leaf headers.
header-column-menuPopover panel for column menu actions.
filter-rowPer-column floating filter row below headers.
filter-cellOne floating filter cell (input + advanced filter menu).
filter-buttonAdvanced filter icon button in a filter cell.
filter-panelAdvanced filter dropdown panel for one column.
footerPagination footer below the grid.
footer-infoRow range summary in the footer.
footer-paginationCentered pagination bar region.
footer-controlsPage size menu and footer action controls (end-aligned).
footer-actionsInline action controls in the pagination footer bar.
page-sizeRows-per-page dropdown.
sidebarRight-edge sidebar shell (tab rail + panes).
sidebar-tabsVertical tab rail for sidebar panes.
sidebar-tabOne sidebar tab button.
sidebar-pane-columnsColumns pane (visibility checklist and pivot controls).
sidebar-pane-filtersFilters pane.
pivot-zone-availableField palette in the columns pane pivot builder.
pivot-zone-rowRow dimension drop zone.
pivot-zone-columnColumn dimension drop zone.
pivot-zone-valueValue dimension drop zone.
pivot-fieldOne draggable field in the palette.
pivot-chipAssigned field chip in a drop zone.
pivot-mode-switchPivot on/off switch in the columns pane.
bodyVirtualized body scrollport.
cellOne body cell.
header-bannerExtra `header` slot region above the grid chrome.
footer-bannerExtra `footer` slot region below pagination.
emptyEmpty-state overlay when the view has no rows.
cell-editorNative input shown while a cell is being edited.
filter-chipsActive column-filter chips in the header chrome.
filter-chipOne active filter chip.
filter-chip-removeClear button on an active filter chip.
bulk-barSelection summary bar.
bulk-bar-countSelected row count label.
bulk-bar-clearClear-selection control.

Methods

MethodDescription
getSnapshot- Returns the current read-only view snapshot from the table engine.
applyState- Applies a partial host + engine state patch.
exportCsv- Serializes the current view to CSV.
copySelection- Copies the selected cells (or current view) as TSV. Pass `{ nested: true }` for stacked headers.
commitCellValue- Writes one cell and emits `vu-cell-change`.

Types

NameDefinition
number | null
null | number
TableAggregatorRegistry
{ [x: string]: TableAggregatorFn; }
TableColumnModel
{
  mode: "tree";
  columns: TableColumnDef[];
}
| {
  mode: "range";
  count: number;
  width: number;
  headerName?: string | ((index: number) => string);
  type?: TableColumnType;
  sortable?: boolean;
  searchable?: boolean;
  pinnedLeft?: number;
  pinnedRight?: number;
  totalBarColumnKeys?: string[];
}
TableDataProvider | null
null | TableDataProvider
TableDefaultColumnDef
{
  type?: TableColumnType;
  visible?: boolean;
  searchable?: boolean;
  sortable?: boolean;
  width?: number;
  flex?: number;
  minWidth?: number;
  maxWidth?: number;
  pinned?: TablePin;
  dataAlign?: TableAlign;
  headerAlign?: TableAlign;
  aggregation?: TableAggregationKind;
  headerAggregation?: TableHeaderAggregationSpec;
  headerAggregationByLevel?: TableHeaderAggregationByLevel;
  cellRenderer?: TableColumnCellRenderer;
  editable?: boolean;
  valueGetter?: TableColumnValueGetter;
  valueFormatter?: TableColumnValueFormatter;
}
TableEngineState["aggregation"]
string
TablePivotColumnSortDirection
"asc" | "desc"
TablePivotConfig | null
null
| {
  rowDimensions: readonly string[];
  columnDimensions: readonly string[];
  values: readonly TablePivotValueField[];
}
TablePivotRowSort
{ [x: string]: TablePivotRowSortEntry; }
TableRowModel
{
  mode: "client";
  rows: TableRow[];
  index?: TableRowIndexProvider;
}
| {
  mode: "lazy";
  rowCount: number;
  getRowId: (sourceRowIndex: number) => string;
  getValue: (sourceRowIndex: number, field: string) => unknown;
  index?: TableRowIndexProvider;
}
VuDataTableAdvancedFilterDetail
{ query: string; snapshot: TableViewSnapshot; }
VuDataTableCellChangeDetail
{
  rowId: string;
  field: string;
  value: unknown;
  row: TableRow | null;
  snapshot: TableViewSnapshot;
}
VuDataTableCellSelectionDetail
{
  activeCell: VuDataTableCellCoord | null;
  selectedCells: string[];
  snapshot: TableViewSnapshot;
}
VuDataTableColumnReorderDetail
{
  columns: TableColumnDef[];
  snapshot: TableViewSnapshot;
}
VuDataTableColumnVisibilityDetail
{
  columns: TableColumnDef[];
  snapshot: TableViewSnapshot;
}
VuDataTableColumnWidthDetail
{
  columnWidths: Record<string, number>;
  snapshot: TableViewSnapshot;
}
VuDataTableExpandedRowDetail
{
  expandedRowIds: string[];
  snapshot: TableViewSnapshot;
}
VuDataTableExpandedRowRenderer | null
null
| (row: TableRow, context: VuDataTableExpandedRowRendererContext) => unknown
VuDataTableFilterDetail
{
  columnFilters: Record<string, TableColumnFilter>;
  snapshot: TableViewSnapshot;
}
VuDataTableGroupDetail
{
  groupBy: string[];
  collapsedGroupKeys: string[];
  columns?: TableColumnDef[];
  snapshot: TableViewSnapshot;
}
VuDataTablePageChangeDetail
VuDataTablePageDetail & { snapshot: TableViewSnapshot; }
VuDataTablePivotDetail
{
  pivotEnabled?: boolean;
  pivotConfig?: TablePivotConfig;
  collapsedPivotKeys?: string[];
  pivotRowSort?: TablePivotRowSort;
  pivotColumnSortDirection?: TablePivotColumnSortDirection;
  snapshot: TableViewSnapshot;
}
VuDataTableQuickFilterDetail
{ query: string; snapshot: TableViewSnapshot; }
VuDataTableRowReorderDetail
{ rowData: TableRow[]; snapshot: TableViewSnapshot; }
VuDataTableRowSelection | null
null
| {
  mode: TableSelectionMode;
  selectAll?: boolean;
  selectedIds?: string[];
  excludedIds?: string[];
}
VuDataTableSelectionChangeDetail
VuDataTableSelectionDetail & {
  snapshot: TableViewSnapshot;
}
VuDataTableSortDetail
{ sort: TableSortRule[]; snapshot: TableViewSnapshot; }
VuDataTableTone
"subtle" | "normal" | "strong"

Related

Data display

  • AvatarAn avatar component with image, initials, icon, or custom content.
  • Avatar GroupAn avatar group component that stacks overlapping avatars.
  • BadgeA badge component for counts, status dots, and overlay marks.
  • ChipA chip component for tags and filters with dismiss or toggle actions.
  • DividerA divider component for horizontal or vertical layout separation.
  • File ViewerA file viewer component for previewing uploaded or linked files.

Guides

  • Pro licenseLicenseInfo and Pro imports
  • AppearanceShared visual props
  • EventsSelection and change events

Browse

  • Previous: ChipEarlier in the sidebar
  • Next: DividerLater in the sidebar
  • All componentsBrowse the full index