Soenneker.Quark.Table 3.0.10

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Quark.Table --version 3.0.10
                    
NuGet\Install-Package Soenneker.Quark.Table -Version 3.0.10
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Quark.Table" Version="3.0.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Quark.Table" Version="3.0.10" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Quark.Table" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Quark.Table --version 3.0.10
                    
#r "nuget: Soenneker.Quark.Table, 3.0.10"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Quark.Table@3.0.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Quark.Table&version=3.0.10
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Quark.Table&version=3.0.10
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Quark.Table

A modern, component-driven Blazor table library that provides complete control over table structure and behavior through Razor components.

Features

  • Component-Driven: Every part of the table is a separate Razor component
  • Full Control: Users define table structure using Blazor markup
  • Sortable Headers: Individual column headers can be made sortable
  • Search Integration: Built-in search functionality with debouncing
  • Pagination: Server-side pagination with customizable controls
  • Server-Side Processing: Full support for server-side data processing
  • Continuation Token Support: Advanced pagination with continuation tokens
  • Loading States: Smooth loading behavior with overlay

Components

Core Components

  • QuarkTable: Main container component that manages state and events
  • QuarkTableElement: Table wrapper component
  • QuarkThead: Table header container
  • QuarkTh: Table header cell with optional sorting
  • QuarkTbody: Table body container
  • QuarkTr: Table row component
  • QuarkTd: Table data cell component

Feature Components

  • QuarkTableSearch: Standalone search component
  • QuarkTablePagination: Pagination controls component
  • QuarkTableInfo: Information display component (shows "x-y of z" format)
  • QuarkTableControls: Layout wrapper for info and pagination components
  • QuarkTableNoData: No data state component with customizable content
  • QuarkTableLoader: Loading state component
  • QuarkTablePageSizeSelector: Page size selector component

Basic Usage

<QuarkTable TotalRecords="100" OnInteraction="OnInteraction">
    <QuarkTableSearch Placeholder="Search employees..." />
    
    <QuarkTableElement>
        <QuarkThead>
            <QuarkTr>
                <QuarkTh Sortable="true" Searchable="true">Name</QuarkTh>
                <QuarkTh Sortable="true" Searchable="true">Email</QuarkTh>
                <QuarkTh Sortable="false" Searchable="true">Age</QuarkTh>
            </QuarkTr>
        </QuarkThead>
        
        <QuarkTbody>
            @foreach (var person in people)
            {
                <QuarkTr Key="@person.Id">
                    <QuarkTd>@person.Name</QuarkTd>
                    <QuarkTd>@person.Email</QuarkTd>
                    <QuarkTd>@person.Age</QuarkTd>
                </QuarkTr>
            }
        </QuarkTbody>
    </QuarkTableElement>
    
    <QuarkTablePagination />
</QuarkTable>

Custom Components

QuarkTableNoData

Display a custom "no data" state when there are no records to show:

<QuarkTableNoData>
    <div style="text-align: center; padding: 2rem;">
        <h4>No records found</h4>
        <p>Try adjusting your search criteria.</p>
    </div>
</QuarkTableNoData>

QuarkTableInfo

Display table information independently of pagination:

<QuarkTableInfo />

<QuarkTableInfo>
    <span>Showing @start-@end of @total records</span>
</QuarkTableInfo>

QuarkTableControls

Layout wrapper that combines info and pagination components with flexible layout options:


<QuarkTableControls>
    <QuarkTableInfo />
    <QuarkTablePagination />
</QuarkTableControls>


<QuarkTableControls ControlsLayout="QuarkTableControlsLayout.InfoRightPaginationLeft">
    <QuarkTableInfo />
    <QuarkTablePagination />
</QuarkTableControls>


<QuarkTableControls ControlsLayout="QuarkTableControlsLayout.Centered">
    <QuarkTableInfo />
    <QuarkTablePagination />
</QuarkTableControls>


<QuarkTableControls ControlsLayout="QuarkTableControlsLayout.Stacked">
    <QuarkTableInfo />
    <QuarkTablePagination />
</QuarkTableControls>


<QuarkTableControls>
    <QuarkTableInfo />
</QuarkTableControls>


<QuarkTableControls>
    <QuarkTablePagination />
</QuarkTableControls>

Server-Side Processing

private async Task OnInteraction(DataTableServerSideRequest request)
{
    var query = dbContext.Employees.AsQueryable();

    // Apply search
    if (!string.IsNullOrEmpty(request.Search?.Value))
    {
        var searchTerm = request.Search.Value.ToLower();
        query = query.Where(e => 
            e.Name.ToLower().Contains(searchTerm) ||
            e.Email.ToLower().Contains(searchTerm));
    }

    // Apply sorting
    if (request.Order?.Any() == true)
    {
        foreach (var order in request.Order)
        {
            query = order.Column switch
            {
                0 => order.Dir == "asc" ? query.OrderBy(e => e.Name) : query.OrderByDescending(e => e.Name),
                1 => order.Dir == "asc" ? query.OrderBy(e => e.Email) : query.OrderByDescending(e => e.Email),
                _ => query
            };
        }
    }

    var totalRecords = await query.CountAsync();
    var pagedData = await query.Skip(request.Start).Take(request.Length).ToListAsync();

    currentData = pagedData;
    totalRecords = totalRecords;
    StateHasChanged();
}

Continuation Token Support

private async Task HandleManualRequest(DataTableServerSideRequest request)
{
    PagedResult<Employee> pagedResult = await EmployeeService.GetEmployeesPaged(request);
    _currentEmployees = pagedResult.Items;

    if (_quarkTable != null)
    {
        _quarkTable.UpdateContinuationTokenPaging(
            pagedResult.Items.Count,
            pagedResult.ContinuationToken,
            request.ContinuationToken);
    }
}

Key Parameters

QuarkTable

Parameter Type Description
TotalRecords int Total number of records for pagination
OnManualRequest EventCallback<DataTableServerSideRequest> Server-side data processing callback
OnOrder EventCallback<QuarkTableOrderEventArgs> Called when column sorting changes
Options QuarkTableOptions Table configuration options

QuarkTh

Parameter Type Default Description
Sortable bool true Enable sorting for this column
Searchable bool true Enable search for this column

QuarkTableOptions

Property Type Default Description
Sortable bool true Enable sorting for the table
DefaultPageSize int 10 Default page size
SearchDebounceMs int 300 Search debounce delay in milliseconds
MaxPageButtons int 5 Maximum number of page buttons

Events

  • OnInitialize: Called when the table is initialized
  • OnManualRequest: Called when data needs to be loaded
  • OnOrder: Called when column sorting changes
  • OnPageSizeChanged: Called when page size changes
  • OnGoToPage: Called when navigating to a specific page
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.38 15 8/23/2025
3.0.37 23 8/22/2025
3.0.36 22 8/22/2025
3.0.35 92 8/21/2025
3.0.34 85 8/17/2025
3.0.33 97 8/15/2025
3.0.32 128 8/12/2025
3.0.31 125 8/12/2025
3.0.30 124 8/12/2025
3.0.29 125 8/12/2025
3.0.28 127 8/12/2025
3.0.27 127 8/12/2025
3.0.26 121 8/12/2025
3.0.25 128 8/12/2025
3.0.24 126 8/11/2025
3.0.23 130 8/11/2025
3.0.22 123 8/11/2025
3.0.21 200 8/7/2025
3.0.17 206 8/6/2025
3.0.16 199 8/6/2025
3.0.15 200 8/6/2025
3.0.14 200 8/6/2025
3.0.13 203 8/6/2025
3.0.12 213 8/6/2025
3.0.11 203 8/5/2025
3.0.10 208 8/5/2025
3.0.9 207 8/5/2025
3.0.8 207 8/5/2025
3.0.7 194 8/5/2025
3.0.6 187 8/5/2025
3.0.5 29 8/2/2025
3.0.4 33 8/1/2025
3.0.3 42 8/1/2025