Skip to content

Cell ​

A list-row cell. Left icon + title (optionally with a required asterisk) + label, right-side value and an indicator arrow, and an optional bottom divider.

Spec source: lh-ui-core/specs/cell.json · Golden cases: lh-ui-core/cases/cell.json (6 cases, translated into xUnit tests)

Basic usage ​

The title takes color.text.primary, the value and label take color.text.secondary — all three are token-driven.

9:41Cell basics
Row title
Label text
Row content
Cell with divider
›

HTML mock preview (Windows / WinUI 3 appearance), not an on-device render

csharp
var cell = new LhCell
{
    Title = "Row title",
    Label = "Label text",
    Value = "Row content",
};

Icon and required ​

Icon takes a local icon name (see the glyph table in the Icon docs) and is drawn on the left; when Required is true a red asterisk in color.danger.default is drawn before the title.

9:41Icon & required
★
With icon
›
✱Required field

HTML mock preview (Windows / WinUI 3 appearance), not an on-device render

Divider and tap ​

When Bordered is true a divider in color.border.lighter is drawn at the bottom; when Clickable is true an indicator arrow is drawn on the right and tapping fires the Click event.

9:41Divider & tap
Clickable
›
Not clickable

HTML mock preview (Windows / WinUI 3 appearance), not an on-device render

csharp
var cell = new LhCell
{
    Title = "Clickable",
    Clickable = true,
    Bordered = true,
};
cell.Click += () => { /* Fires only when Clickable is true */ };

Light and dark themes ​

Toggle the site theme in the top-right corner and the text and divider colors inside the simulator phone frame change with it; on a real device, switch via LhTheme.Apply(true).

9:41Dark cells
Row title
Label text
Row content

HTML mock preview (Windows / WinUI 3 appearance), not an on-device render; light/dark values are all taken from the core token snapshot

API ​

Props ​

PropDescriptionTypeDefault
ClickTap callback; fired only when Clickable is trueevent Action—
TitleTitle (the spec's title slot)string""
LabelLabel text under the title (the label slot)string""
ValueRight-side value text (the value slot)string""
IconLeft icon name (resolved by the local icon table)string?null
RequiredWhether to draw the required red asterisk before the titleboolfalse
ClickableWhether the cell is clickable (shows the arrow; gates Click)boolfalse
BorderedWhether to draw the bottom dividerbooltrue

Token Reference ​

TokenUsage
cell.paddingHorizontal / cell.paddingVerticalPaddings
cell.gapVertical spacing between title and label
cell.fontSizeTitle / fontSizeLabel / fontSizeValueThree font sizes
color.text.{primary,secondary,regular}Title / label / value / icon colors
color.danger.defaultRequired red asterisk
color.border.lighterBottom divider
icon.size.mediumLeft icon size
spacing.{sm,xs}Icon spacing / internal element spacing
typography.lineHeight.primaryText line height

Golden Case Reference ​

How the 6 assertions of cases/cell.json map to xUnit tests (tests/LhCellTests.cs):

case idAssertionLocal test
title-and-value-renderBoth title and value are renderedTitle_And_Value_Render
label-renders-secondary-toneThe label takes the secondary text color tokenLabel_Renders_Secondary_Tone
required-uses-danger-tokenThe required asterisk consumes the danger color tokenRequired_Uses_Danger_Token
bordered-emits-line-commandThe bordered form emits a LINE commandBordered_Emits_Line_Command
clickable-emits-onclickA tap fires onClick when clickableClickable_Emits_OnClick
not-clickable-no-onclickNo onClick when not clickableNot_Clickable_No_OnClick

Plus dark-mode suites: Dark_Colors_Come_From_Dark_Tokens / Dimensions_Are_Identical_In_Dark_Mode. Run: cd lh-ui-windows && dotnet test.

lh-ui native bloodline · Windows (C# + WinUI 3)