Soenneker.Quark.Table
3.0.21
Prefix Reserved
dotnet add package Soenneker.Quark.Table --version 3.0.21
NuGet\Install-Package Soenneker.Quark.Table -Version 3.0.21
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.21" />
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.21" />
<PackageReference Include="Soenneker.Quark.Table" />
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.21
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Quark.Table, 3.0.21"
#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.21
#: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.21
#tool nuget:?package=Soenneker.Quark.Table&version=3.0.21
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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)
- QuarkTableBottomBar: Bottom bar layout wrapper for info and pagination components
- QuarkTableTopBar: Top bar layout component for header content
- QuarkTableLeft: Left-aligned container component for use in topbar/bottombar
- QuarkTableRight: Right-aligned container component for use in topbar/bottombar
- QuarkTableBarControls: Container for buttons and custom controls
- QuarkTableNoData: No data state component with customizable content
- QuarkTableLoader: Loading state component
- QuarkTablePageSizeSelector: Page size selector component
Legacy Components
- QuarkTableControls: Legacy name for QuarkTableBottomBar (still supported)
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>
QuarkTableBottomBar
Layout wrapper that combines info and pagination components with flexible layout options:
<QuarkTableBottomBar>
<QuarkTableLeft>
<QuarkTableInfo />
</QuarkTableLeft>
<QuarkTableRight>
<QuarkTablePagination />
</QuarkTableRight>
</QuarkTableBottomBar>
<QuarkTableBottomBar ControlsLayout="QuarkTableControlsLayout.InfoRightPaginationLeft">
<QuarkTableInfo />
<QuarkTablePagination />
</QuarkTableBottomBar>
<QuarkTableBottomBar>
<QuarkTableLeft>
<QuarkTableInfo />
<QuarkTablePageSizeSelector />
</QuarkTableLeft>
<QuarkTableRight>
<QuarkTablePagination />
</QuarkTableRight>
</QuarkTableBottomBar>
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 OnInteraction(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 | Default | Description |
---|---|---|---|
TotalRecords |
int |
0 |
Total number of records for pagination |
Visible |
bool |
true |
Whether the table is visible |
OnManualRequest |
EventCallback<DataTableServerSideRequest> |
- | Server-side data processing callback |
OnOrder |
EventCallback<QuarkTableOrderEventArgs> |
- | Called when column sorting changes |
Options |
QuarkTableOptions |
new() |
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 |
---|---|---|---|
DefaultPageSize |
int |
10 |
Default page size |
SearchDebounceMs |
int |
300 |
Search debounce delay in milliseconds |
SearchPosition |
SearchPosition |
End |
Position of the search box |
Debug |
bool |
false |
Enable debug logging |
Events
OnInitialize
: Called when the table is initializedOnManualRequest
: Called when data needs to be loadedOnOrder
: Called when column sorting changesOnPageSizeChanged
: Called when page size changesOnGoToPage
: Called when navigating to a specific page
Product | Versions 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.
-
net9.0
- Microsoft.AspNetCore.Components.Web (>= 9.0.8)
- Soenneker.Blazor.Utils.ResourceLoader (>= 3.0.1486)
- Soenneker.DataTables.Dtos.Column (>= 3.0.4)
- Soenneker.DataTables.Dtos.ServerResponse (>= 3.0.1)
- Soenneker.DataTables.Dtos.ServerSideRequest (>= 3.0.3)
- Soenneker.Utils.Debounce (>= 3.0.4)
- Soenneker.Utils.Json (>= 3.0.2340)
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.21 | 0 | 8/7/2025 |
3.0.17 | 8 | 8/6/2025 |
3.0.16 | 6 | 8/6/2025 |
3.0.15 | 7 | 8/6/2025 |
3.0.14 | 7 | 8/6/2025 |
3.0.13 | 9 | 8/6/2025 |
3.0.12 | 12 | 8/6/2025 |
3.0.11 | 11 | 8/5/2025 |
3.0.10 | 12 | 8/5/2025 |
3.0.9 | 12 | 8/5/2025 |
3.0.8 | 12 | 8/5/2025 |
3.0.7 | 12 | 8/5/2025 |
3.0.6 | 13 | 8/5/2025 |
3.0.5 | 11 | 8/2/2025 |
3.0.4 | 15 | 8/1/2025 |
3.0.3 | 25 | 8/1/2025 |