Data Table Component

A powerful and flexible data table component with sorting, filtering, pagination, and row selection.

Basic Table

A simple table with automatic sorting and pagination.

ID
Name
Email
Age
1Joshua Jamesjohn.murphy@enterprise.net53
2Jimmy Ramirezamanda.morris539@example.com36
3Joseph Phillipslinda.jones@company.com32
4Steven Cruznicole.flores@company.com31
5Susan Kellymark.murphy@organization.com21

Row Selection

Table with multiple row selection using checkboxes. Use arrow keys to navigate and Enter/Space to select.

Name
Email
Role
Joshua Jamesjohn.murphy@enterprise.netAdmin
Jimmy Ramirezamanda.morris539@example.comAdmin
Joseph Phillipslinda.jones@company.comAdmin
Steven Cruznicole.flores@company.comAdmin
Susan Kellymark.murphy@organization.comDesigner

Custom Cell Templates

Use custom templates to render cells with badges, buttons, and other components.

Name
Status
Role
Actions
Joshua James
Suspended
Admin
Jimmy Ramirez
Suspended
Admin
Joseph Phillips
Inactive
Admin
Steven Cruz
Active
Admin
Susan Kelly
Pending
Designer

Global Search & Column Visibility

Search across all columns and toggle column visibility.

ID
Name
Email
Age
Role
Status
1Joshua Jamesjohn.murphy@enterprise.net53Admin
Suspended
2Jimmy Ramirezamanda.morris539@example.com36Admin
Suspended
3Joseph Phillipslinda.jones@company.com32Admin
Inactive
4Steven Cruznicole.flores@company.com31Admin
Active
5Susan Kellymark.murphy@organization.com21Designer
Pending
6Katherine Garciacarol.mitchell@example.com41Admin
Pending
7Cynthia Garciadonna.richardson336@example.com54User
Inactive
8Jacob Jonesedward.walker@enterprise.net62Moderator
Inactive
9Deborah Wrightlarry.ramos@enterprise.net57Analyst
Inactive
10Katherine Perezamanda.ramos@enterprise.net65Analyst
Inactive

Empty State

Displays a message when there's no data to show.

No results found

Loading State

Shows a loading indicator while data is being fetched.

Name
Email
Role
Joshua Jamesjohn.murphy@enterprise.netAdmin
Jimmy Ramirezamanda.morris539@example.comAdmin
Joseph Phillipslinda.jones@company.comAdmin
Steven Cruznicole.flores@company.comAdmin
Susan Kellymark.murphy@organization.comDesigner

Without Toolbar

A minimal table without the toolbar (no search or column visibility).

Name
Email
Age
Joshua Jamesjohn.murphy@enterprise.net53
Jimmy Ramirezamanda.morris539@example.com36
Joseph Phillipslinda.jones@company.com32
Steven Cruznicole.flores@company.com31
Susan Kellymark.murphy@organization.com21

Custom Toolbar Actions

Add custom action buttons to the toolbar.

Name
Email
Role
Joshua Jamesjohn.murphy@enterprise.netAdmin
Jimmy Ramirezamanda.morris539@example.comAdmin
Joseph Phillipslinda.jones@company.comAdmin
Steven Cruznicole.flores@company.comAdmin
Susan Kellymark.murphy@organization.comDesigner

Accessibility Features

Built-in accessibility features following WAI-ARIA design patterns.

ARIA Attributes

  • role="grid" for screen readers
  • aria-sort indicates column sort direction
  • aria-selected indicates row selection state
  • aria-label on checkboxes for selection
  • Focusable rows with visible focus indicator

Keyboard Shortcuts

Navigate and interact with the table using keyboard.

Navigate to next row ArrowDown
Navigate to previous row ArrowUp
Toggle row selection
Enter / Space
Sort column (click header) Click

API Reference

Component properties and parameters.

DataTable

Data

Type: IEnumerable<TData>

The data source for the table.

SelectionMode

Type: DataTableSelectionMode

Default: None

The selection mode: None, Single, or Multiple.

SelectedItems

Type: IReadOnlyCollection<TData>

The currently selected items. Use with @bind-SelectedItems for two-way binding.

EnableKeyboardNavigation

Type: bool

Default: true

When true, enables keyboard navigation for table rows (arrow keys to navigate, Enter/Space to select).

ShowToolbar

Type: bool

Default: true

Whether to show the toolbar with global search and column visibility.

ShowPagination

Type: bool

Default: true

Whether to show pagination controls.

IsLoading

Type: bool

Default: false

Whether the table is in a loading state.

InitialPageSize

Type: int

Default: 5

The initial page size.

PageSizes

Type: int[]

Default: [5, 10, 20, 50, 100]

The available page size options.

DataTableColumn

Property

Type: Func<TData, TValue>

Expression to get the column value from a data item.

Header

Type: string

The column header text.

Sortable

Type: bool

Default: false

Whether the column is sortable.

CellTemplate

Type: RenderFragment<TData>?

Custom template for rendering the cell content.

Visible

Type: bool

Default: true

Whether the column is visible.

An unhandled error has occurred. Reload 🗙