Tesserae

InfiniteScrollingList

Description

InfiniteScrollingList is a dynamic component designed to display a paginated list of UI elements that loads additional content as the user scrolls. It supports both list (stack) and grid layouts depending on the number of columns provided. Use this component when you need to render items in small to moderate quantity with an infinite scrolling experience. For extremely large datasets, consider using VirtualizedList.

Usage

Initialize the InfiniteScrollingList using one of the overloaded factory methods from the Tesserae.UI helper. You provide an initial set of items (optionally empty) and an asynchronous function that returns the next page of items. Optionally, you can pass multiple UnitSize values to establish a grid layout. The component automatically appends a VisibilitySensor that triggers fetching additional items when nearing the bottom of the list.

Below is an example that instantiates an InfiniteScrollingList in a simple list mode:

API reference

class

InfiniteScrollingList

public sealed class InfiniteScrollingList : IComponent, ISpecialCaseStyling

A list that lazily loads additional items as the user scrolls toward the bottom, suitable for very large or unbounded result sets.

Constructors

Constructor
InfiniteScrollingList
public InfiniteScrollingList(Func<IComponent[]> getNextItemPage, params UnitSize[] columns) : this(new IComponent[0], () => Task.FromResult<IComponent[]>(getNextItemPage()), columns)

Initializes a new instance of this class.

Constructor
InfiniteScrollingList
public InfiniteScrollingList(IComponent[] items, Func<IComponent[]> getNextItemPage, params UnitSize[] columns) : this(items, () => Task.FromResult<IComponent[]>(getNextItemPage()), columns)

Initializes a new instance of this class.

Constructor
InfiniteScrollingList
public InfiniteScrollingList(Func<Task<IComponent[]>> getNextItemPage, params UnitSize[] columns) : this(new IComponent[0], getNextItemPage, columns)

Initializes a new instance of this class.

Constructor
InfiniteScrollingList
public InfiniteScrollingList(IComponent[] items, Func<Task<IComponent[]>> getNextItemPage, params UnitSize[] columns)

Initializes a new instance of this class.

Properties

Property
InfiniteScrollingList.StylingContainer
public HTMLElement StylingContainer

Gets or sets the styling container.

Property
InfiniteScrollingList.PropagateToStackItemParent
public bool PropagateToStackItemParent

Gets or sets the propagate to stack item parent.

Methods

Method
InfiniteScrollingList.WithEmptyMessage
public InfiniteScrollingList WithEmptyMessage(Func<IComponent> emptyListMessageGenerator)

Returns the component configured with the given empty message.

Method
InfiniteScrollingList.Render
public HTMLElement Render()

Renders the component's root HTML element.

Samples

Infinite Scrolling Stack with Async Loading

Each time the visibility sensor at the bottom of the list comes into view, the loader awaits a simulated network call and returns the next page of 15 items. Scroll to the bottom — the page counter advances and the newly loaded items are appended.

Infinite Scrolling Grid Layout

By passing more than one column width to InfiniteScrollingList, the same async-loaded items are laid out as a responsive grid. This sample uses three 33%-width columns.

See also

Referenced by

© 2026 Tesserae. All rights reserved.