Skip to content

Loading ​

A circular spinning loading indicator. It supports sizes and semantic tones.

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

Platform notes

The spinning is carried by WinUI's ProgressRing platform animation (an austere stance: only geometry is emitted, the platform fills in the animation) — the token layer decides only the diameter, the stroke width, and the ring color.

Sizes ​

Three sizes map to the loading.size.* diameter tokens.

9:41Loading sizes

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

csharp
var loading = new LhLoading
{
    Size = LhLoadingSize.Large,
    Tone = LhLoadingTone.Primary,
};

Tones ​

Tone decides the ring color and maps one-to-one onto the semantic color tokens.

9:41Loading tones

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

API ​

Props ​

PropDescriptionTypeDefault
SizeIndicator diameter; maps to the loading.size.* tokensLhLoadingSizeMedium
ToneRing color; takes the matching semantic color tokenLhLoadingTonePrimary

LhLoadingSize ​

ValueDiameter token
Smallloading.size.small (20epx)
Mediumloading.size.medium (28epx)
Largeloading.size.large (36epx)

LhLoadingTone ​

ValueRing color token
Primarycolor.primary.default
Successcolor.success.default
Warningcolor.warning.default
Dangercolor.danger.default
Infocolor.info.default

Token Reference ​

TokenUsage
loading.size.{small,medium,large}Three diameters
loading.strokeWidthLoading ring stroke width
color.{primary,success,warning,danger,info}.defaultFive ring colors

Golden Case Reference ​

How the 5 assertions of cases/loading.json map to xUnit tests (tests/LhLoadingTests.cs):

case idAssertionLocal test
medium-size-uses-medium-tokenMedium consumes the medium diameter tokenMedium_Size_Uses_Medium_Token
large-size-uses-large-tokenLarge consumes the large diameter tokenLarge_Size_Uses_Large_Token
primary-tone-uses-primary-tokenThe primary tone takes the primary color tokenPrimary_Tone_Uses_Primary_Token
success-tone-uses-success-tokenThe success tone takes the success color tokenSuccess_Tone_Uses_Success_Token
render-emits-ring-commandExactly one RING command is emittedRender_Emits_Ring_Command

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)