Skip to components
DEVELOPER REFERENCE · v4.0.30

MetricTile API

Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.

MetricTile10 props0 callbacks0 methods

Preset and CSS

Set preset.className to attach your CSS class to the component's rendered surface. Explicit component props take precedence over preset options.

CSS parts in the example [data-part="detail"] [data-part="extra"] [data-part="label"] [data-part="root"] [data-part="value"]

Signed positive values and details can use positive, negative or neutral tones.

Use styles.root and styles.parts in a theme and generate a CSS file with themeToCss. For other JSON-friendly component props, spread presetProps(preset) before explicit props. Parts and states depend on configuration; the gallery shows those visible in the current preview.

Props10

MetricTile props
NameTypeDescription
presetOptional
ClassPreset | undefinedInspect type
Portable presentation preset.
classNameOptionalstring | undefinedAdditional host class.
childrenOptional
ComponentChildrenInspect type
Optional extra content such as a compact chart.
labelRequiredstringLocalized name of the metric.
valueRequiredstring | numberFormatted value shown prominently.
detailOptionalstring | number | undefinedOptional formatted context or change.
valueToneOptional
MetricTone | undefinedInspect type
Explicitly override the inferred tone of a signed value.
detailToneOptional
MetricTone | undefinedInspect type
Override the inferred tone of the detail.
summaryOptional
{ markerColor: string; legend?: string; detailColor?: string; } | undefinedInspect type
Compact heading with a color marker and optional comparison legend.
visualOptional
{ accent: string; icon?: ComponentChildren; iconSvg?: string; showIcon?: boolean; detailLead?: string; detailRest?: string; detailTone?: MetricTone; trend?: readonly number[]; progress?: { value: number; label: string; captionLead?: string; captionRest?: string; }; } | undefinedInspect type
Optional illustrated card presentation; all labels and data are caller-owned.

Events and callbacks0

No component-specific events or callbacks.

Methods0

No component-specific imperative methods. Use props and callbacks to control this component.