Tesserae

DetailsList

Description

DetailsList is a robust component for displaying an information-rich collection of items. It extends the basic List capabilities by supporting features such as sorting, grouping, multiple selection, and pagination. This component is ideal for scenarios where a dense presentation of metadata is required, such as file explorers or order listings. It is part of the Collections group in Tesserae.

Usage

Instantiate a DetailsList using the static helper method from Tesserae.UI. You must provide one or more column definitions (using helpers like IconColumn and DetailsListColumn) and supply list items that implement the IDetailsListItem interface.

Below is a minimal example of how to create a DetailsList displaying file items:

API reference

class

DetailsList<TDetailsListItem>

public class DetailsList<TDetailsListItem> : IComponent, ISpecialCaseStyling where TDetailsListItem : class, IDetailsListItem<TDetailsListItem>

A virtualised, sortable, multi-column table for displaying large lists of typed items, similar to Fluent UI's DetailsList.

Constructors

Constructor
DetailsList
public DetailsList(params IDetailsListColumn[] columns)

Initializes a new instance of this class.

Properties

Property
DetailsList.StylingContainer
public HTMLElement StylingContainer

Gets or sets the styling container.

Property
DetailsList.PropagateToStackItemParent
public bool PropagateToStackItemParent

Gets or sets the propagate to stack item parent.

Property
DetailsList.IsCompact
public bool IsCompact { get ; set ; }

Gets or sets a value indicating whether the component is rendered in compact form.

Methods

Method
DetailsList.Compact
public DetailsList<TDetailsListItem> Compact()

Renders the component in a compact form.

Method
DetailsList.WithEmptyMessage
public DetailsList<TDetailsListItem> WithEmptyMessage(Func<IComponent> emptyListMessageGenerator)

Returns the component configured with the given empty message.

Method
DetailsList.WithPaginatedItems
public DetailsList<TDetailsListItem> WithPaginatedItems(Func<Task<TDetailsListItem[]>> getNextItemPage)

Returns the component configured with the given paginated items.

Method
DetailsList.WithListItems
public DetailsList<TDetailsListItem> WithListItems(params TDetailsListItem[] listItems)

Returns the component configured with the given list items.

Method
DetailsList.SortedBy
public DetailsList<TDetailsListItem> SortedBy(string columnSortingKey)

Configures the sorted by on the component.

Method
DetailsList.Render
public HTMLElement Render()

Renders the component's root HTML element.

class

DetailsListColumn

public class DetailsListColumn : IDetailsListColumn

A typed column definition used to declare how a property of is rendered inside a .

Constructors

Constructor
DetailsListColumn
public DetailsListColumn(string title, UnitSize width, UnitSize maxWidth, bool isRowHeader = false, bool enableColumnSorting = false, string sortingKey = null, Action onColumnClick = null)

Initializes a new instance of this class.

Properties

Property
DetailsListColumn.SortingKey
public string SortingKey { get; }

Gets or sets the sorting key.

Property
DetailsListColumn.Title
public string Title { get; }

Gets or sets the title of the component.

Property
DetailsListColumn.Width
public UnitSize Width { get; }

Gets or sets the CSS width of the component.

Property
DetailsListColumn.MaxWidth
public UnitSize MaxWidth { get; }

Gets or sets the CSS max-width of the component.

Property
DetailsListColumn.IsRowHeader
public bool IsRowHeader { get; }

Returns a value indicating whether the component is row header.

Property
DetailsListColumn.EnableColumnSorting
public bool EnableColumnSorting { get; }

Enables the column sorting on the component.

Property
DetailsListColumn.EnableOnColumnClickEvent
public bool EnableOnColumnClickEvent { get; }

Enables the on column click event on the component.

Methods

Method
DetailsListColumn.OnColumnClick
public void OnColumnClick()

Registers a callback invoked when the column click event fires.

Method
DetailsListColumn.Render
public HTMLElement Render()

Renders the component's root HTML element.

class

DetailsListIconColumn

public class DetailsListIconColumn : IDetailsListColumn

A specialized column that renders a single icon per row.

Constructors

Constructor
DetailsListIconColumn
public DetailsListIconColumn(Icon icon, UnitSize width, UnitSize maxWidth, bool enableColumnSorting = false, string sortingKey = null, Action onColumnClick = null)

Initializes a new instance of this class.

Properties

Property
DetailsListIconColumn.SortingKey
public string SortingKey { get; }

Gets or sets the sorting key.

Property
DetailsListIconColumn.Icon
public Icon Icon { get; }

Gets or sets the icon shown by the component.

Property
DetailsListIconColumn.Width
public UnitSize Width { get; }

Gets or sets the CSS width of the component.

Property
DetailsListIconColumn.MaxWidth
public UnitSize MaxWidth { get; }

Gets or sets the CSS max-width of the component.

Property
DetailsListIconColumn.IsRowHeader
public bool IsRowHeader

Returns a value indicating whether the component is row header.

Property
DetailsListIconColumn.EnableColumnSorting
public bool EnableColumnSorting { get; }

Enables the column sorting on the component.

Property
DetailsListIconColumn.EnableOnColumnClickEvent
public bool EnableOnColumnClickEvent { get; }

Enables the on column click event on the component.

Methods

Method
DetailsListIconColumn.OnColumnClick
public void OnColumnClick()

Registers a callback invoked when the column click event fires.

Method
DetailsListIconColumn.Render
public HTMLElement Render()

Renders the component's root HTML element.

Samples

Sortable DetailsList with 50 Items

This sample populates the list with 50 generated rows so sorting and scrolling are meaningful. Click any column header to re-sort, or click a row to fire its OnListItemClick event (shown via a toast).

DetailsList with Live Pagination

Combine WithPaginatedItems with a real async producer. Each scroll to the bottom appends another 10 rows, simulating remote loading with Task.Delay. A Toast reports each batch so the loading behavior is visible.

DetailsList with Empty Message

Use WithEmptyMessage to render a placeholder when no items are available. The delegate is only invoked when the list is empty, so it can be as elaborate as needed.

See also

© 2026 Tesserae. All rights reserved.