Skip to content
daisyBlazor

DataTable

An opinionated DataGrid wrapper for list screens: hover and zebra rows, a built-in pager, skeleton loading, an empty state and an optional per-row Actions column.
Data components.table
Cover · <DataTable>
Actions
Free5,000
Pro1,500
Team1,000
Enterprise500
1-4 of 4

Examples

Declare columns as on DataGrid; the Actions template renders right-aligned per-row buttons, and paging comes built in.

Actions
Billing revampAna Silva14
Mobile appTom Becker27
Customer portalPriya Nair9
Status pageLucas Martin3
Data export APIMei Chen18
1-5 of 6
website/Examples/Data/DataTableBasicExample.razor Source

Loading shows skeleton rows; with no items, EmptyIcon and EmptyMessage fill the body.

Ana SilvaPro, annual
Tom BeckerFree
Priya NairEnterprise
1-3 of 3
website/Examples/Data/DataTableStatesExample.razor Source

API

<DataTable<T>>

DaisyBlazor.Data

Reusable DataGrid<T> wrapper with sensible defaults for server-side paging, sort state, skeleton loading, and an empty-state slot.

Parameters

  • ActionsTitle string
    = "Actions"

    Header text of the Actions column. Defaults to "Actions".

  • Dense bool
    = false

    When true, applies dense styling.

  • Elevation int
    = 0

    Elevation for the grid surface.

  • EmptyIcon string
    = null

    Icon shown in the empty state. Defaults to SearchOff.

  • EmptyMessage string
    = null

    Empty-state message. Defaults to "No records found"; pass a localized string to override.

  • Items IEnumerable<T>
    = null

    Local items source. Mutually exclusive with ServerData.

  • Loading bool
    = false

    When true, replaces row content with skeleton placeholders.

  • PageSizeOptions int[]
    = [10, 25, 50]

    Page-size options shown in the pager.

  • RowsPerPage int?
    = null

    Initial rows per page. Defaults to the first entry of PageSizeOptions.

  • ServerData Func<GridState<T>, CancellationToken, Task<GridData<T>>>
    = null

    Server-data loader. Mutually exclusive with Items.

  • SkeletonRows int
    = 5

    Number of skeleton rows rendered while Loading.

  • Class string
    = null

    Additional CSS classes applied to the grid.

  • Style string
    = null

    Inline style applied to the grid.

Content

  • Actions RenderFragment<T>

    Optional per-row action template rendered as the last column.

  • Columns RenderFragment

    Column declarations (use PropertyColumn/TemplateColumn).

Something went wrong while running the docs. Reload