Lumeo

Data Table

A powerful table component with templated headers, rows, loading states, and empty states.

Installation

dotnet add package Lumeo.DataGrid

One-time app setup (AddLumeo(), CSS & JS) is covered in the installation guide.

Usage

@using Lumeo

<DataTable />

When to Use

  • Displaying sortable and filterable datasets with column headers
  • Row selection for bulk actions like delete, export, or status changes
  • Paginated lists of records such as users, orders, or transactions
Status Email Amount
Success
[email protected] $316.00
Success
[email protected] $242.00
Pending
[email protected] $837.00
Failed
[email protected] $874.00
Success
[email protected] $721.00
Status Email Amount
Status Email Amount

No payments found

There are no payments to display yet.

Alice Johnson [email protected] Admin
Bob Smith [email protected] User
Carol White [email protected] Editor
Dave Brown [email protected] User
Name Email Role
Alice Johnson [email protected] Admin
Bob Smith [email protected] User
Carol White [email protected] Editor
Dave Brown [email protected] User

0 of 4 row(s) selected

API Reference

DataTable<TItem>

Prop Type Default Description
ItemsIEnumerable<TItem>?nullThe data source for table rows.
HeaderTemplateRenderFragment?nullTemplate for the table header row (th elements).
RowTemplateRenderFragment<TItem>?nullTemplate for each data row. Receives the item as context.
LoadingTemplateRenderFragment?nullTemplate for skeleton loading rows shown when IsLoading is true.
EmptyTemplateRenderFragment?nullTemplate shown when Items is null or empty.
IsLoadingboolfalseShow loading skeleton rows instead of data.
SkeletonRowsint5Number of skeleton rows to display when loading.
SortColumnstring?nullThe currently sorted column key. Use with @bind-SortColumn.
SortColumnChangedEventCallback<string?>-Callback when the sort column changes.
SortDirSortDirectionAscendingThe current sort direction. Values: None, Ascending, Descending.
SortDirChangedEventCallback<SortDirection>-Callback when the sort direction changes.
OnSortEventCallback<(string, SortDirection)>-Callback with column key and new direction when a sortable header is clicked.
SelectableboolfalseWhen true, adds a checkbox column for row selection.
SelectedItemsHashSet<TItem>?nullThe set of currently selected items. Use with @bind-SelectedItems.
SelectedItemsChangedEventCallback<HashSet<TItem>>-Callback when the selected items set changes.
VirtualizeboolfalseEnables virtualized rendering for large datasets.
ItemSizefloat48Estimated height (px) of each row, used when Virtualize is true.
Classstring?nullAdditional CSS classes for the table element.
AdditionalAttributesDictionary<string, object>?nullAdditional HTML attributes.

DataTableSortableHeader

Prop Type Default Description
ChildContentRenderFragment?nullThe header label content.
Columnstring""The column key this header controls sorting for. Required.
SortColumnstring?nullThe currently active sort column, used to highlight this header.
SortDirectionDataTable<object>.SortDirectionNoneThe current sort direction, used to render the appropriate arrow icon.
OnSortEventCallback<(string, SortDirection)>-Callback invoked with the column key and toggled direction when clicked.
Classstring?nullAdditional CSS classes.
AdditionalAttributesDictionary<string, object>?nullAdditional HTML attributes.
  • Table — For simple static tables without sorting, selection, or loading states
  • Pagination — For navigating between pages of data in a table