ListItemText

Description

A two-line list item that pairs a bold title with a lighter subtitle underneath, with an optional leading icon shown inside a rounded-square background. Use it for list rows, settings entries, and notification items that need a short heading plus one line of secondary context.

Usage

Create a ListItemText with ListItemText(title, subtitle). The subtitle is optional — omit it (or pass null) to show only the title. Add a leading icon with SetIcon, and set its colors with IconForeground / IconBackground.

API reference

class

ListItemText

public class ListItemText : ComponentBase<ListItemText, HTMLElement>

A simple two-line list item that shows a bold title with a lighter subtitle underneath, plus an optional leading icon rendered inside a rounded-square background.

Namespace
Tesserae
Inheritance
ComponentBase<ListItemText, HTMLElement> → ListItemText

Constructors

NameDescription
ListItemTextInitializes a new instance of the ListItemText class.
Constructor
ListItemText
public ListItemText(string title, string subtitle = null)

Initializes a new instance of the ListItemText class.

Parameters

title
The (bold) title text.
subtitle
The (lighter) subtitle text. When null or empty the subtitle is hidden.

Properties

NameDescription
TitleGets or sets the title text.
SubtitleGets or sets the subtitle text. Setting it to null or empty hides the subtitle.
Property
ListItemText.Title
public string Title { get ; set ; }

Gets or sets the title text.

Property
ListItemText.Subtitle
public string Subtitle { get ; set ; }

Gets or sets the subtitle text. Setting it to null or empty hides the subtitle.

Methods

NameDescription
SetTitleSets the title text.
SetSubtitleSets the subtitle text.
SetIconShows a leading icon inside a rounded-square background. Calling this again updates the existing icon.
IconForegroundSets the color of the leading icon. Has no effect until an icon is set.
IconBackgroundSets the background color of the rounded square behind the leading icon. Has no effect until an icon is set.
RenderRenders the component's root HTML element.
Method
ListItemText.SetTitle
public ListItemText SetTitle(string title)

Sets the title text.

Method
ListItemText.SetSubtitle
public ListItemText SetSubtitle(string subtitle)

Sets the subtitle text.

Method
ListItemText.SetIcon
public ListItemText SetIcon(UIcons icon, UIconsWeight weight = UIconsWeight.Regular, TextSize size = TextSize.Medium)

Shows a leading icon inside a rounded-square background. Calling this again updates the existing icon.

Method
ListItemText.IconForeground
public ListItemText IconForeground(string color)

Sets the color of the leading icon. Has no effect until an icon is set.

Method
ListItemText.IconBackground
public ListItemText IconBackground(string color)

Sets the background color of the rounded square behind the leading icon. Has no effect until an icon is set.

Method
ListItemText.Render
public override HTMLElement Render()

Renders the component's root HTML element.

See also

  • Components overview
  • Avatar — pairs an avatar with name/role/status text for a similar list-row layout.
  • ResourceCard — a richer card for summarizing a resource with title, subtitle, tags and actions.
© 2026 Curiosity. All rights reserved.