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
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
| Name | Description |
|---|---|
| ListItemText | Initializes a new instance of the ListItemText class. |
Properties
Methods
| Name | Description |
|---|---|
| SetTitle | Sets the title text. |
| SetSubtitle | Sets the subtitle text. |
| SetIcon | Shows a leading icon inside a rounded-square background. Calling this again updates the existing icon. |
| IconForeground | Sets the color of the leading icon. Has no effect until an icon is set. |
| IconBackground | Sets the background color of the rounded square behind the leading icon. Has no effect until an icon is set. |
| Render | Renders the component's root HTML element. |
public ListItemText SetSubtitle(string subtitle)Sets the subtitle text.
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.
public ListItemText IconForeground(string color)Sets the color of the leading icon. Has no effect until an icon is set.
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.
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.