Skip to main content
twblazor
Home
  • Get started
  • Tailwind with Blazor
  • Why twblazor?
  • Theme
  • Class Merge
    • Configuring localization
    • RTL Provider
  • Breadcrumb
  • Card
  • Carousel
  • Collapse
  • Context Menu
  • Drawer
  • Footer
  • Menu
  • Navbar
  • On This Page
  • Separator
  • Sidebar
  • Stepper
  • Tabs
  • Tree List
  • Container
  • Flex
  • Grid
  • Text
  • Link
  • Button
  • Form
    • AutocompleteNew
    • Checkbox
    • Color Picker
    • Date Picker
    • Date Range Picker
    • Datetime Picker
    • Datetime Range Picker
    • File Upload
    • Input GroupNew
    • NumericNew
    • Masked InputNew
    • Radio Button
    • Range SliderNew
    • RatingNew
    • Select
    • Slider
    • Switch
    • Tag InputNew
    • Text EditorNew
    • Textfield
    • Time Picker
    • Time Range Picker
  • Toggle
  • Toggle Group
  • Alert
  • Avatar
  • Badge
  • Chip
  • Empty
  • Icon
  • Popover
  • Progress
  • Skeleton
  • Spinner
  • Tooltip
  • Data Table
  • SpreadsheetNew
  • Column Filter Editor
  • Pagination
  • Pick List
  • Barcode
  • QR Code
  • Calendar
  • Table
  • Attachment
  • Overview
    • Bar
    • Bullet
    • Column
    • Dot Plot
    • Dumbbell
    • Icon
    • Lollipop
    • Radial Bar
    • Range
    • Word Cloud
    • Area
    • Bump
    • Bump Area
    • Candlestick
    • Gantt
    • Horizon
    • Line
    • Slope
    • Small Multiples
    • Stream Graph
    • Funnel
    • Gauge
    • Marimekko
    • Nightingale
    • Pie
    • Treemap
    • Waffle
    • Waterfall
    • Circular Treemap
    • Convex Treemap
    • Dendrogram
    • Sunburst
    • Barcode
    • Beeswarm
    • Box Plot
    • Density Plot
    • Histogram
    • Radial Histogram
    • Ridgeline
    • Strip Plot
    • Violin Plot
    • Categorical Scatter
    • Contour
    • Hexagonal Binning
    • Quadrant
    • Scatter
    • Heatmap
    • Matrix
    • Parallel Coordinates
    • Radar
    • Arc Diagram
    • Chord Diagram
    • Flowchart
    • Network Diagram
    • Sankey
    • Euler Diagram
    • Venn Diagram
  • Bubble
  • Marker
  • Message
  • Dialog Service
  • Toast Service
API DocumentationAI Agents & Skills
Home Get Started

Data

TwTable

TwTable is a Blazor table component with striped, hoverable, bordered and borderless styles, plus manual pagination.

Last updated 7 November 2026

Basic table

A simple table component with customizable styling.
Product name Color Category Price
Apple MacBook Pro 17" Silver Laptop £2999
Microsoft Surface Pro White Laptop PC £1999
Magic Mouse 2 Black Accessories £99
RAZOR
<TwTable Id="basic-table-example">
    <TableHeader>
        <tr>
            <th scope="col" class="px-6 py-3">Product name</th>
            <th scope="col" class="px-6 py-3">Color</th>
            <th scope="col" class="px-6 py-3">Category</th>
            <th scope="col" class="px-6 py-3">Price</th>
        </tr>
    </TableHeader>
    <TableBody>
        <tr>
            <th scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
                Apple MacBook Pro 17"
            </th>
            <td class="px-6 py-4">Silver</td>
            <td class="px-6 py-4">Laptop</td>
            <td class="px-6 py-4">£2999</td>
        </tr>
        <tr>
            <th scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
                Microsoft Surface Pro
            </th>
            <td class="px-6 py-4">White</td>
            <td class="px-6 py-4">Laptop PC</td>
            <td class="px-6 py-4">£1999</td>
        </tr>
        <tr>
            <th scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap dark:text-white">
                Magic Mouse 2
            </th>
            <td class="px-6 py-4">Black</td>
            <td class="px-6 py-4">Accessories</td>
            <td class="px-6 py-4">£99</td>
        </tr>
    </TableBody>
</TwTable>

Striped table

Table with alternating row colors for better readability.
Name Department Role
John Doe Engineering Developer
Jane Smith Product Designer
Bob Johnson Operations Manager
RAZOR
<TwTable Id="striped-table-example" Striped Hoverable>
    <TableHeader>
        <tr>
            <th scope="col" class="px-6 py-3">Name</th>
            <th scope="col" class="px-6 py-3">Department</th>
            <th scope="col" class="px-6 py-3">Role</th>
        </tr>
    </TableHeader>
    <TableBody>
        <tr>
            <td class="px-6 py-4">John Doe</td>
            <td class="px-6 py-4">Engineering</td>
            <td class="px-6 py-4">Developer</td>
        </tr>
        <tr>
            <td class="px-6 py-4">Jane Smith</td>
            <td class="px-6 py-4">Product</td>
            <td class="px-6 py-4">Designer</td>
        </tr>
        <tr>
            <td class="px-6 py-4">Bob Johnson</td>
            <td class="px-6 py-4">Operations</td>
            <td class="px-6 py-4">Manager</td>
        </tr>
    </TableBody>
</TwTable>

Hoverable table

Table with hover effects on rows.
Task Status Priority
Design homepage In Progress High
Write documentation Completed Medium
Fix bugs Pending High
RAZOR
<TwTable Id="hover-table" Hoverable Striped="false">
    <TableHeader>
        <tr>
            <th scope="col" class="px-6 py-3">Task</th>
            <th scope="col" class="px-6 py-3">Status</th>
            <th scope="col" class="px-6 py-3">Priority</th>
        </tr>
    </TableHeader>
    <TableBody>
        <tr>
            <td class="px-6 py-4">Design homepage</td>
            <td class="px-6 py-4">In Progress</td>
            <td class="px-6 py-4">High</td>
        </tr>
        <tr>
            <td class="px-6 py-4">Write documentation</td>
            <td class="px-6 py-4">Completed</td>
            <td class="px-6 py-4">Medium</td>
        </tr>
        <tr>
            <td class="px-6 py-4">Fix bugs</td>
            <td class="px-6 py-4">Pending</td>
            <td class="px-6 py-4">High</td>
        </tr>
    </TableBody>
</TwTable>

Bordered table

Table with a hairline divider between rows, for extra structure without a busy grid look.
Country Capital Population
United States Washington, D.C. 331 million
United Kingdom London 67 million
Germany Berlin 83 million
RAZOR
<TwTable Id="bordered-table-example" Bordered Striped Hoverable>
    <TableHeader>
        <tr>
            <th scope="col" class="px-6 py-3">Country</th>
            <th scope="col" class="px-6 py-3">Capital</th>
            <th scope="col" class="px-6 py-3">Population</th>
        </tr>
    </TableHeader>
    <TableBody>
        <tr>
            <td class="px-6 py-4">United States</td>
            <td class="px-6 py-4">Washington, D.C.</td>
            <td class="px-6 py-4">331 million</td>
        </tr>
        <tr>
            <td class="px-6 py-4">United Kingdom</td>
            <td class="px-6 py-4">London</td>
            <td class="px-6 py-4">67 million</td>
        </tr>
        <tr>
            <td class="px-6 py-4">Germany</td>
            <td class="px-6 py-4">Berlin</td>
            <td class="px-6 py-4">83 million</td>
        </tr>
    </TableBody>
</TwTable>

Table without border

Table with no outer border.
Country Capital Population
United States Washington, D.C. 331 million
United Kingdom London 67 million
Germany Berlin 83 million
RAZOR
<TwTable Id="no-border-table" NoBorder Striped Hoverable>
    <TableHeader>
        <tr>
            <th scope="col" class="px-6 py-3">Country</th>
            <th scope="col" class="px-6 py-3">Capital</th>
            <th scope="col" class="px-6 py-3">Population</th>
        </tr>
    </TableHeader>
    <TableBody>
        <tr>
            <td class="px-6 py-4">United States</td>
            <td class="px-6 py-4">Washington, D.C.</td>
            <td class="px-6 py-4">331 million</td>
        </tr>
        <tr>
            <td class="px-6 py-4">United Kingdom</td>
            <td class="px-6 py-4">London</td>
            <td class="px-6 py-4">67 million</td>
        </tr>
        <tr>
            <td class="px-6 py-4">Germany</td>
            <td class="px-6 py-4">Berlin</td>
            <td class="px-6 py-4">83 million</td>
        </tr>
    </TableBody>
</TwTable>

Column widths

Add a ColumnGroup of TwTableColumn elements to size the columns. A column with a Width never goes narrower than it, so a long description in one column cannot squeeze a short name or a code value in another. Columns without a width share the space that is left. Width takes any CSS length and needs no Tailwind class, and Span lets one definition cover several columns.
Command What it does
dotnet add package twblazor Adds the component library to your project, along with the default theme and the scripts the interactive components need.
dotnet build Builds the project and runs the Tailwind build, so every class the theme uses is compiled into your stylesheet.
RAZOR
<TwTable Id="column-widths-table" Bordered AriaLabel="Package commands">
    <ColumnGroup>
        <TwTableColumn Width="14rem" />
        <TwTableColumn />
    </ColumnGroup>
    <TableHeader>
        <tr>
            <th scope="col" class="px-6 py-3">Command</th>
            <th scope="col" class="px-6 py-3">What it does</th>
        </tr>
    </TableHeader>
    <TableBody>
        <tr>
            <th scope="row" class="px-6 py-4 text-start align-top font-normal"><code>dotnet add package twblazor</code></th>
            <td class="px-6 py-4">Adds the component library to your project, along with the default theme and the scripts the interactive components need.</td>
        </tr>
        <tr>
            <th scope="row" class="px-6 py-4 text-start align-top font-normal"><code>dotnet build</code></th>
            <td class="px-6 py-4">Builds the project and runs the Tailwind build, so every class the theme uses is compiled into your stylesheet.</td>
        </tr>
    </TableBody>
</TwTable>

Fixed layout

By default the browser sizes each column from its content. Set FixedLayout and the widths come from the column group and the header row instead, so the columns stay put however long the content in a row is. This suits tables whose rows change as you page or filter them. Long content wraps inside its column.
Owner Due Notes
Jane Smith 14/11/2026 Write the onboarding guide for new starters, covering accounts, equipment and the first week.
Bob Johnson 21/11/2026 Review supplier contracts.
RAZOR
<TwTable Id="fixed-layout-table" FixedLayout Striped AriaLabel="Team tasks">
    <ColumnGroup>
        <TwTableColumn Width="10rem" />
        <TwTableColumn Width="8rem" />
        <TwTableColumn />
    </ColumnGroup>
    <TableHeader>
        <tr>
            <th scope="col" class="px-6 py-3">Owner</th>
            <th scope="col" class="px-6 py-3">Due</th>
            <th scope="col" class="px-6 py-3">Notes</th>
        </tr>
    </TableHeader>
    <TableBody>
        <tr>
            <td class="px-6 py-4">Jane Smith</td>
            <td class="px-6 py-4">14/11/2026</td>
            <td class="px-6 py-4 wrap-break-word">Write the onboarding guide for new starters, covering accounts, equipment and the first week.</td>
        </tr>
        <tr>
            <td class="px-6 py-4">Bob Johnson</td>
            <td class="px-6 py-4">21/11/2026</td>
            <td class="px-6 py-4 wrap-break-word">Review supplier contracts.</td>
        </tr>
    </TableBody>
</TwTable>

Scrolling with a sticky header

Set MaxHeight to any CSS length and the rows scroll inside the table once it is that tall. Add StickyHeader to keep the column headings in view while they scroll. The scroll area is a Tab stop, so the rows can be scrolled with the arrow keys too.
Month Orders Revenue
January 412 £18,240
February 389 £17,115
March 455 £20,380
April 431 £19,020
May 478 £21,660
June 502 £23,010
July 466 £20,940
August 441 £19,580
September 497 £22,430
October 523 £24,105
November 610 £28,870
December 688 £33,215
RAZOR
<TwTable Id="sticky-header-table" MaxHeight="16rem" StickyHeader Striped AriaLabel="Monthly sales">
    <TableHeader>
        <tr>
            <th scope="col" class="px-6 py-3">Month</th>
            <th scope="col" class="px-6 py-3">Orders</th>
            <th scope="col" class="px-6 py-3">Revenue</th>
        </tr>
    </TableHeader>
    <TableBody>
        @foreach (var (month, orders, revenue) in _monthlySales)
        {
            <tr>
                <td class="px-6 py-4">@month</td>
                <td class="px-6 py-4">@orders</td>
                <td class="px-6 py-4">£@revenue.ToString("N0")</td>
            </tr>
        }
    </TableBody>
</TwTable>
CSHARP
@code {
    private static readonly (string Month, int Orders, int Revenue)[] _monthlySales =
    [
        ("January", 412, 18_240), ("February", 389, 17_115), ("March", 455, 20_380), ("April", 431, 19_020),
        ("May", 478, 21_660), ("June", 502, 23_010), ("July", 466, 20_940), ("August", 441, 19_580),
        ("September", 497, 22_430), ("October", 523, 24_105), ("November", 610, 28_870), ("December", 688, 33_215)
    ];
}

Row groups

Use RowGroups in place of TableBody to split the rows into groups, each in its own <tbody>. The context is the body's classes, so put it on every <tbody> and the groups keep the striped, hoverable and bordered styles. Start each group with a header cell that has scope="rowgroup", and screen readers announce the group's name with every row in it.
Name Role
Engineering
John Doe Developer
Alice Williams Developer
Product
Jane Smith Designer
RAZOR
<TwTable Id="row-groups-table" Bordered AriaLabel="Team members by department">
    <TableHeader>
        <tr>
            <th scope="col" class="px-6 py-3">Name</th>
            <th scope="col" class="px-6 py-3">Role</th>
        </tr>
    </TableHeader>
    <RowGroups Context="bodyClass">
        <tbody class="@bodyClass">
            <tr class="bg-gray-50 dark:bg-gray-800">
                <th scope="rowgroup" colspan="2" class="px-6 py-3 text-start font-semibold">Engineering</th>
            </tr>
            <tr>
                <td class="px-6 py-4">John Doe</td>
                <td class="px-6 py-4">Developer</td>
            </tr>
            <tr>
                <td class="px-6 py-4">Alice Williams</td>
                <td class="px-6 py-4">Developer</td>
            </tr>
        </tbody>
        <tbody class="@bodyClass">
            <tr class="bg-gray-50 dark:bg-gray-800">
                <th scope="rowgroup" colspan="2" class="px-6 py-3 text-start font-semibold">Product</th>
            </tr>
            <tr>
                <td class="px-6 py-4">Jane Smith</td>
                <td class="px-6 py-4">Designer</td>
            </tr>
        </tbody>
    </RowGroups>
</TwTable>

Typed rows

Put a TwTableRows in TableBody, give it your rows with Items, and write one row in it. The context is the row's item, so the row is typed. On its own it renders every row, and it is what lets the table page or virtualize them, below.
Product name Category Price
Apple MacBook Pro 17" Laptop £2,999
Microsoft Surface Pro Laptop £1,999
Magic Mouse 2 Accessories £99
Apple Watch Series 9 Wearables £499
RAZOR
<TwTable Id="typed-rows-table" Striped AriaLabel="Products">
    <TableHeader>
        <tr>
            <th scope="col" class="px-6 py-3">Product name</th>
            <th scope="col" class="px-6 py-3">Category</th>
            <th scope="col" class="px-6 py-3">Price</th>
        </tr>
    </TableHeader>
    <TableBody>
        <TwTableRows Items="@_products.Take(4)" Context="product">
            <tr>
                <td class="px-6 py-4">@product.Name</td>
                <td class="px-6 py-4">@product.Category</td>
                <td class="px-6 py-4">£@product.Price.ToString("N0")</td>
            </tr>
        </TwTableRows>
    </TableBody>
</TwTable>
CSHARP
@code {
    private int productPage = 1;
    
    private readonly List<Product> _products =
    [
        new("Apple MacBook Pro 17\"", "Laptop", 2999),
        new("Microsoft Surface Pro", "Laptop", 1999),
        new("Magic Mouse 2", "Accessories", 99),
        new("Apple Watch Series 9", "Wearables", 499),
        new("iPad Air", "Tablet", 799),
        new("Samsung Galaxy S24", "Phone", 1199),
        new("Sony WH-1000XM5", "Accessories", 399),
        new("AirPods Pro", "Accessories", 249)
    ];
    
    public record Product(string Name, string Category, int Price);
}

Pagination

Set EnablePagination and the table splits its TwTableRows into pages, with a pagination below it. Pagination is off by default. PageSize sets the rows on a page and PageSizeOptions the sizes people can pick; bind @bind-CurrentPage to follow or set the page. If the rows shrink under the current page, as after a search, the table moves back to the last page and raises CurrentPageChanged.
Product name Category Price
Apple MacBook Pro 17" Laptop £2,999
Microsoft Surface Pro Laptop £1,999
Magic Mouse 2 Accessories £99

Page 1

RAZOR
<TwTable Id="pagination-table" EnablePagination PageSize="3" @bind-CurrentPage="productPage" AriaLabel="Products by page">
    <TableHeader>
        <tr>
            <th scope="col" class="px-6 py-3">Product name</th>
            <th scope="col" class="px-6 py-3">Category</th>
            <th scope="col" class="px-6 py-3">Price</th>
        </tr>
    </TableHeader>
    <TableBody>
        <TwTableRows Items="@_products" Context="product">
            <tr>
                <td class="px-6 py-4">@product.Name</td>
                <td class="px-6 py-4">@product.Category</td>
                <td class="px-6 py-4">£@product.Price.ToString("N0")</td>
            </tr>
        </TwTableRows>
    </TableBody>
</TwTable>
<p class="mt-2">Page @productPage</p>
CSHARP
@code {
    private int productPage = 1;
    
    private readonly List<Product> _products =
    [
        new("Apple MacBook Pro 17\"", "Laptop", 2999),
        new("Microsoft Surface Pro", "Laptop", 1999),
        new("Magic Mouse 2", "Accessories", 99),
        new("Apple Watch Series 9", "Wearables", 499),
        new("iPad Air", "Tablet", 799),
        new("Samsung Galaxy S24", "Phone", 1199),
        new("Sony WH-1000XM5", "Accessories", 399),
        new("AirPods Pro", "Accessories", 249)
    ];
    
    public record Product(string Name, string Category, int Price);
}

Virtualization

Set EnableVirtualization and only the rows scrolled into view are rendered, so the table stays fast with tens of thousands of rows. It is off by default. The rows scroll inside the table, which is 32rem tall unless you set MaxHeight, and the header stays in view. Keep each row to one line, about ItemSize pixels tall. Write the row in RowTemplate and put its AriaRowIndex on the <tr>: the table then tells screen readers how many rows there are and where each one sits, so they still read "row 5000 of 10000".
Reading Sensor Temperature
RAZOR
<TwTable Id="virtualized-table" EnableVirtualization MaxHeight="20rem" Striped AriaLabel="Ten thousand readings">
    <TableHeader>
        <tr aria-rowindex="1">
            <th scope="col" class="px-6 py-3">Reading</th>
            <th scope="col" class="px-6 py-3">Sensor</th>
            <th scope="col" class="px-6 py-3">Temperature</th>
        </tr>
    </TableHeader>
    <TableBody>
        <TwTableRows Items="@_readings">
            <RowTemplate Context="row">
                <tr aria-rowindex="@row.AriaRowIndex">
                    <td class="px-6 py-2.5">@row.Item.Number</td>
                    <td class="px-6 py-2.5">@row.Item.Sensor</td>
                    <td class="px-6 py-2.5">@row.Item.Celsius.ToString("N1") °C</td>
                </tr>
            </RowTemplate>
        </TwTableRows>
    </TableBody>
</TwTable>
CSHARP
@code {
    private static readonly string[] _sensors = ["Kitchen", "Hall", "Garage", "Loft", "Garden"];
    
    private readonly List<Reading> _readings = [.. Enumerable.Range(1, 10_000).Select(i =>
        new Reading(i, _sensors[i % _sensors.Length], Math.Round(15 + (i * 37 % 100) / 10.0, 1)))];
    
    public record Reading(int Number, string Sensor, double Celsius);
}

Loading rows from a server

For data too big to load at once, give TwTableRows an ItemsProvider in place of Items. With pagination it is asked for one page at a time, with virtualization for the rows scrolling into view, and otherwise for every row. It returns the rows and the total count, and receives a cancellation token that is cancelled when a newer request replaces it. While rows load the table is marked busy and shows LoadingContent. Call RefreshDataAsync on the rows after the data changes elsewhere.
Reading Sensor Temperature
Loading readings…
RAZOR
<TwTable Id="provider-table" EnablePagination PageSize="5" AriaLabel="Readings from the server">
    <TableHeader>
        <tr>
            <th scope="col" class="px-6 py-3">Reading</th>
            <th scope="col" class="px-6 py-3">Sensor</th>
            <th scope="col" class="px-6 py-3">Temperature</th>
        </tr>
    </TableHeader>
    <TableBody>
        <TwTableRows TItem="Reading" ItemsProvider="@LoadReadingsAsync" Context="reading">
            <ChildContent>
                <tr>
                    <td class="px-6 py-4">@reading.Number</td>
                    <td class="px-6 py-4">@reading.Sensor</td>
                    <td class="px-6 py-4">@reading.Celsius.ToString("N1") °C</td>
                </tr>
            </ChildContent>
            <LoadingContent>
                <tr><td colspan="3" class="px-6 py-4 text-center">Loading readings…</td></tr>
            </LoadingContent>
        </TwTableRows>
    </TableBody>
</TwTable>
CSHARP
@code {
    // Stands in for a database query: in a real app, pass the request on to your API or Entity Framework.
    private async ValueTask<TwTableRowsResult<Reading>> LoadReadingsAsync(TwTableRowsRequest request)
    {
        await Task.Delay(300, request.CancellationToken);
        var page = _readings.Skip(request.StartIndex).Take(request.Count ?? _readings.Count).ToList();
        return new TwTableRowsResult<Reading>(page, _readings.Count);
    }
}

Resizable columns

Set ResizableColumns and define the columns with TwTableColumn. Each column then has a separator on the border at the end of its header: drag it, or focus it with Tab and press Arrow Left or Arrow Right, holding Shift for bigger steps. Screen readers hear each separator as "Resize Name" with the column's width. Give each column a Label to name its separator, MinWidth and MaxWidth to limit it, and Resizable="false" to keep it at its width. Resizing turns on FixedLayout, gives every column its current width in pixels so the others stay put, and raises ColumnsResized and each column's WidthChanged.
Product name Category Price
Apple MacBook Pro 17" Laptop £2,999
Microsoft Surface Pro Laptop £1,999
Magic Mouse 2 Accessories £99
Apple Watch Series 9 Wearables £499

Resize a column to see its new width.

RAZOR
<TwTable Id="resizable-table" ResizableColumns Bordered ColumnsResized="OnColumnsResized" AriaLabel="Products with resizable columns">
    <ColumnGroup>
        <TwTableColumn Id="resizable-name" Label="Product name" Width="16rem" MinWidth="120" />
        <TwTableColumn Id="resizable-category" Label="Category" />
        <TwTableColumn Id="resizable-price" Label="Price" Width="8rem" Resizable="false" />
    </ColumnGroup>
    <TableHeader>
        <tr>
            <th scope="col" class="px-6 py-3">Product name</th>
            <th scope="col" class="px-6 py-3">Category</th>
            <th scope="col" class="px-6 py-3">Price</th>
        </tr>
    </TableHeader>
    <TableBody>
        <TwTableRows Items="@_products.Take(4)" Context="product">
            <tr>
                <td class="px-6 py-4">@product.Name</td>
                <td class="px-6 py-4">@product.Category</td>
                <td class="px-6 py-4">£@product.Price.ToString("N0")</td>
            </tr>
        </TwTableRows>
    </TableBody>
</TwTable>
<p class="mt-2">@resizedWidths</p>
CSHARP
@code {
    private string resizedWidths = "Resize a column to see its new width.";
    
    private void OnColumnsResized(IReadOnlyDictionary<string, string> widths) =>
        resizedWidths = string.Join(", ", widths.Select(w => $"{w.Key.Replace("resizable-", string.Empty)} {w.Value}"));
}

Keyboard navigation

The table is read as a native table. Its scroll area is a Tab stop so a table wider or taller than its container can be scrolled from the keyboard. With ResizableColumns, each resizable column has a separator on its header's border that reports the column's width.
Key What it does
Tab or Shift+ plus Tab Moves focus to the table's scroll area, then to each column's resize separator and the pagination.
Arrow Left or Arrow Right or Arrow Up or Arrow Down or Pg.Up or Pg.Down In the scroll area: scrolls the table. A virtualized table renders the rows as they scroll into view.
Arrow Left or Arrow Right On a resize separator: makes the column wider or narrower. The key moves the border the way it points, in either text direction.
Shift+ plus Arrow Left or Shift+ plus Arrow Right On a resize separator: resizes in bigger steps.
Enter or Space In the pagination: moves to a page, or opens the page size list.

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
FixedLayout string
Header string
StickyHeader string
Body string
BodyStriped string
BodyHoverable string
RowDivider string
Footer string
SearchColumn string
SortIcon string
HeaderCellPadding string
BodyCellPadding string
EmptyState string
ResizeHandle string
GroupByColumn string
GroupRow string
GroupToggle string
GroupCount string
LoadingCell string
ActionsCell string
EditingRow string
FilterPanel string
FilterHeading string

Full reference: TwTableTheme on the API docs.

On this page

  • Basic table
  • Striped table
  • Hoverable table
  • Bordered table
  • Table without border
  • Column widths
  • Fixed layout
  • Scrolling with a sticky header
  • Row groups
  • Typed rows
  • Pagination
  • Virtualization
  • Loading rows from a server
  • Resizable columns
  • Keyboard navigation
  • Theme configuration
twblazor

The Tailwind CSS component library for Blazor. Accessible, themeable and MIT licensed.

Discord (opens in a new tab) GitHub(opens in a new tab)

Get started

  • Install guide
  • Theming
  • Class merging
  • Localization

Guides

  • Tailwind CSS with Blazor
  • Why twblazor?
  • Right to left
  • AI agents and skills

Resources

  • API documentation (opens in a new tab)
  • llms.txt (opens in a new tab)
  • MIT License (opens in a new tab)

Community

  • Contributing (opens in a new tab)
  • Code of conduct (opens in a new tab)
  • Report an issue (opens in a new tab)

twblazor is and always will be free and open source.

An unhandled error has occurred. Reload