Blazor playground

Nova v3.37.0

Preview

Blazor

Datatable

nv-datatable

A full data table for React, Vue, Angular and Blazor that turns rows and column definitions into a sortable, pageable table with custom cells.

Complex data. Clear interactions.

Live demo

Pagination

Use a datatable for structured records that people scan, compare and act on, such as assets, orders or readings. You give it rows and columns, and it renders the table, sorting, pagination, selection and expandable rows. It is built per framework for React, Vue, Angular and Blazor; there is no native web component. For a simple table that you write as markup, use table.

Anatomy

A datatable with a header row of selection, sortable headings and an action column, above a body row with selection, monospaced text, text, a link and an action button. Callouts mark 1 the header row and 2 the body row.

The parts of a datatable, shown with its shared table primitives.
  1. Header row: one cell per column, from headerName. Sortable columns show the sort direction; a custom header can add help.
  2. Body row: one cell per field. valueFormatter turns raw values into text, and a custom cell can show badges, links or row actions.

Look and feel

Spark and Ocean use the same table structure. Rows have default, hover and selected appearances; selection needs an actual selection state, not a hover colour used as a substitute.

Cell types

Headers can contain a column label or a select-all checkbox. Sorting controls cycle through ascending, descending and unsorted states; a help icon can add context to an unfamiliar heading.

The design provides seven body-cell patterns:

PatternUse
ActionOne or two controls for actions on that row.
AvatarA person's image or initials.
BadgeA short category, priority or status.
CheckboxSelect a row for a later action.
LinkOpen the record or a related destination.
Monospaced textIdentifiers, codes or numbers that benefit from consistent spacing.
Text and subtitleA main value with optional supporting detail.

Composing a table

Figma supplies column, row and cell partials. Its column partials contain ten editable body cells across nine preset variations; row partials have fourteen editable cells. Those are design-template capacities, not limits on rows or columns in code. Individual header and body cell partials offer the most control over a custom layout.

Custom cells and headers

Replace a Figma body-cell slot with a local component. In code, use the framework's supported renderer or template:

FrameworkCustom body cellsCustom headers
ReactrenderCellrenderHeader
VueCell slots or renderCellrenderHeader
AngularCell templates or renderCellText through headerName
BlazorCell templates or RenderCellRenderHeader

Use custom cells for avatars, status badges, links and actions; valueFormatter is enough when only the text needs to change. The seven design patterns are compositions, not a cellType property.

Name icon-only actions and selection controls, retain meaningful column headings, and make custom controls keyboard operable. The framework table supplies the table structure; custom cell accessibility remains part of your implementation.

Guidance

  • Keep columns to what people compare; align numbers and keep units in the value, such as "142.5 MW".
  • Set an initial sort that matches the task, and give the empty table a clear message.
  • Page or virtualise long lists. Your application can also filter rows before passing them in.
DoKeep the unit with each value.
Don'tAvoid bare numbers that leave the unit to guesswork.

Selection and expandable rows are available in React and Blazor only. The Datatable topics cover columns, sorting, filtering, pagination, selection and more in depth.

Sources