Metric

Description

A component to display a metric

A Metric component displays a key value alongside a title and an optional indicator of change.

API reference

class

Metric

public class Metric : ComponentBase<Metric, HTMLElement>

A large numeric KPI tile used inside dashboards, showing a value with optional label and trend indicator.

Namespace
Tesserae
Inheritance
ComponentBase<Metric, HTMLElement> → Metric

Constructors

NameDescription
MetricInitializes a new instance of this class.
Constructor
Metric
Overload
Metric(string, string)Initializes a new instance of this class.
Metric(IComponent, IComponent)Initializes a new instance of this class.
Metric(string, string)
public Metric(string title, string value)

Initializes a new instance of this class.

Parameters

title string
value string
Metric(IComponent, IComponent)
public Metric(IComponent title, IComponent value)

Initializes a new instance of this class.

Parameters

title IComponent
value IComponent

Methods

NameDescription
ChartConfigures the component to chart.
ChangeConfigures the component to change.
RenderRenders the component's root HTML element.
Method
Metric.Chart
public Metric Chart(IComponent chart)

Configures the component to chart.

Method
Metric.Change
public Metric Change(IComponent change)

Configures the component to change.

Method
Metric.Render
public override HTMLElement Render()

Renders the component's root HTML element.

Samples

Basic Metrics

Metrics with Change Indicator

Card With Header & Tags

With Tooltips inside title

Metrics with Sparkline Charts

See also

© 2026 Curiosity. All rights reserved.