dssoca docs

MetricTile

Single KPI value with delta.

A labelled metric with an optional suffix and a directional delta.

Demo

live · storybook Open in Storybook

Demo loads from http://localhost:6006. Run pnpm storybook for it to render locally.

Usage

svelte
<script>
  import { MetricTile } from 'dssoca';
</script>

<MetricTile label="req/min" value="142" delta="↑12%" dir="up" />

Props

PropTypeDefaultDescription
labelstringRequired. Metric label.
valuestring | numberRequired. The metric value.
suffixstringUnit/suffix shown after the value.
deltastringDelta text.
dir'up' | 'down''up'Delta direction (colour).
size'sm' | 'md' | 'lg'Per-instance size override; inherits the ancestor `data-size-variant` when unset.