Data
TwDataTable
TwDataTable is a Blazor data table component with pagination, search, sortable columns and custom row classes for displaying structured data.
Last updated
Basic Data Table with Pagination
A feature-rich data table with pagination and search functionality.
| Product | Category | Price | Stock |
|---|---|---|---|
| Apple MacBook Pro 17" | Laptop | £2,999.00 | 15 |
| Microsoft Surface Pro | Laptop | £1,999.00 | 8 |
| Magic Mouse 2 | Accessories | £99.00 | 50 |
| Apple Watch Series 9 | Wearables | £499.00 | 25 |
| iPad Air | Tablet | £799.00 | 5 |
Searchable Data Table
Data table with search functionality to filter results.
| Product | Category | Price | Stock |
|---|---|---|---|
| Apple MacBook Pro 17" | Laptop | £2,999.00 | 15 |
| Microsoft Surface Pro | Laptop | £1,999.00 | 8 |
| Magic Mouse 2 | Accessories | £99.00 | 50 |
| Apple Watch Series 9 | Wearables | £499.00 | 25 |
| iPad Air | Tablet | £799.00 | 5 |
| Samsung Galaxy S24 | Phone | £1,199.00 | 30 |
| Sony WH-1000XM5 | Accessories | £399.00 | 12 |
| Dell XPS 15 | Laptop | £2,199.00 | 18 |
| Google Pixel 8 Pro | Phone | £999.00 | 22 |
| AirPods Pro | Accessories | £249.00 | 40 |
Data Table Without Pagination
Display all data without pagination controls.
| Name | Department | Role |
|---|---|---|
| John Doe | Engineering | Developer |
| Jane Smith | Product | Designer |
| Bob Johnson | Operations | Manager |
| Alice Williams | Engineering | Developer |
| Charlie Brown | Quality | QA Engineer |
Custom Row Classes
Data table with custom row styling based on conditions.
| Product | Category | Price | Stock |
|---|---|---|---|
| Apple MacBook Pro 17" | Laptop | £2,999.00 | 15 |
| Microsoft Surface Pro | Laptop | £1,999.00 | 8 (Low Stock) |
| Magic Mouse 2 | Accessories | £99.00 | 50 |
| Apple Watch Series 9 | Wearables | £499.00 | 25 |
| iPad Air | Tablet | £799.00 | 5 (Low Stock) |
Sortable Data Table with Columns
Data table with per-column sortability. Click column headers to sort. Some columns are sortable (with icons), others are not.
Product Name | Category | Price | Stock |
|---|---|---|---|
| Apple MacBook Pro 17" | Laptop | £2,999.00 | 15 |
| Microsoft Surface Pro | Laptop | £1,999.00 | 8 (Low Stock) |
| Magic Mouse 2 | Accessories | £99.00 | 50 |
| Apple Watch Series 9 | Wearables | £499.00 | 25 |
| iPad Air | Tablet | £799.00 | 5 (Low Stock) |
| Samsung Galaxy S24 | Phone | £1,199.00 | 30 |
| Sony WH-1000XM5 | Accessories | £399.00 | 12 |
| Dell XPS 15 | Laptop | £2,199.00 | 18 |
| Google Pixel 8 Pro | Phone | £999.00 | 22 |
| AirPods Pro | Accessories | £249.00 | 40 |
Theme Configuration
Styling is controlled by
TwBlazorTheme.Components (a TwTableTheme), configured via the
AddTwBlazor() options callback described on the Get Started page.
Every property is a set of Tailwind classes, so changes are picked up by your own Tailwind build.
Inherited from TwTable - this component reuses that theme rather than defining its own.
| Property | Type | Controls |
|---|---|---|
Wrapper |
string | |
ContainerClip |
string | |
Base |
string | |
Bordered |
string | |
Header |
string | |
Body |
string | |
BodyStriped |
string | |
BodyHoverable |
string | |
RowDivider |
string | |
Footer |
string | |
SearchColumn |
string | |
SortIcon |
string | |
HeaderCellPadding |
string | |
BodyCellPadding |
string | |
EmptyState |
string |
Full reference: TwTableTheme on the API docs.