Skip to content

Metric

type: "metric"6 styles · 26 properties

A stat tile: one big formatted number with an optional label and up/down delta badge — built for KPIs, revenue counters and scorecards.

Updated

Open in the editor
Preview · DefaultReal render, 1200 × 630
Metric component, Default style, sample render
The metric component’s default look.

Try your own data

Change the metric here with the same controls the editor shows. The preview updates as you type, and you get the API request for your changes.

6 styles

Pick one to preview it

Examples

Each example is the same metric with different values. The JSON is what you send.

Daily signups tile

New signups today with a green up-delta — ready for a morning Slack post.

{
  "revenue.value": 1382,
  "revenue.label": "Signups today",
  "revenue.format": "number",
  "revenue.delta": 4.6
}

Conversion rate scorecard

Checkout conversion as a percentage, with the delta shown in raw points.

{
  "revenue.value": 3.8,
  "revenue.label": "Checkout conversion",
  "revenue.format": "percent",
  "revenue.delta": 0.4,
  "revenue.deltaFormat": "value"
}

MRR ticker with sparkline

A revenue tile with a 12-week trendline; the delta auto-derives from the series.

{
  "revenue.value": 48200,
  "revenue.label": "MRR",
  "revenue.format": "compact",
  "revenue.sparkline": [
    39000,
    40200,
    41000,
    42500,
    43000,
    44800,
    45200,
    46100,
    46900,
    47500,
    47900,
    48200
  ]
}

Good for

  • Daily revenue or signup tiles posted to Slack
  • OG images with live user or star counts
  • Investor update graphics with growth deltas
  • Follower milestone cards for social media

New values, every render

Push the latest number with '<key>.value' and the change with '<key>.delta'; label, format and the '<key>.sparkline' trend series are overridable too. Send only the properties you want to change; everything else keeps its design value. The API guides cover every language.

Or ask your AI agent“Using imejis, make a 1200 × 630 image with a Metric component (type "metric") filled with my data, then give me a render link I can call with new values.”
curl -X POST "https://render.imejis.io/v1/$IMEJIS_DESIGN_ID" \
  -H "dma-api-key: $IMEJIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "revenue.value": 52890,
    "revenue.delta": 8.2
  }' \
  -o image.png

Properties

Every property works the same in the editor, in design JSON and as an API override.

26 properties shown

PropertyTypeDefaultWhat it does
Data
valuenumber | string—The headline value to display.
labelstring""Caption describing the metric.
format'number' | 'compact' | 'percent' | 'currency' | 'none'"number"How the value is formatted (48,250 / 48.3K / 48% / $48,250 / raw).
prefixstring—Text prepended to the value.
suffixstring—Text appended to the value.
deltanumber—Change amount shown in the delta badge (no badge when unset).
Look
labelPosition'top' | 'bottom'"top"Whether the label sits above or below the value.
deltaDirection'up-good' | 'down-good'"up-good"Which direction counts as positive (colors the badge).
align'left' | 'center' | 'right'"left"Horizontal alignment of the tile content.
valueSizenumber0Font size of the value in pixels.
deltaUpColorcolor"#16a34a"Badge color for a positive delta.
deltaDownColorcolor"#dc2626"Badge color for a negative delta.
sparklinenumber[][]A mini trend series drawn in a strip at the bottom of the tile. When set (and delta is unset), the delta auto-derives from the first→last change. Overridable per render for watchlists.
sparklineColorcolor—Line color for the sparkline; blank auto-picks red/green by direction.
sparklineFillbooleantrueShade the area under the sparkline.
Values and labels
currencySymbolstring"$"Currency symbol used with the 'currency' format.
showDeltaboolean—Show the delta badge.
deltaFormat'percent' | 'value'"percent"Whether the delta renders as a percentage or a raw value.
valueColorcolor"#0f172a"Color of the value.
labelColorcolor"#64748b"Color of the label.
Frame
opacitynumber1Overall component opacity from 0 (transparent) to 1 (opaque).
borderWidthnumber0Border thickness in pixels around the component.
borderColorcolor"transparent"Border color (any CSS color).
borderStyle'solid' | 'dashed' | 'dotted' | 'double' | 'none'"solid"Border line style.
borderRadiusnumber0Corner radius in pixels.
boxShadowstring—CSS box-shadow applied to the component, e.g. "0 4px 6px rgba(0,0,0,0.1)".

Metric questions

Can the number update on every API call?

Yes — send '<key>.value' plus '<key>.delta' for the change badge; the label and format are overridable too.

How are values formatted?

format supports number (48,250), compact (48.3K), percent, currency with a custom currencySymbol, or none for raw text — plus prefix and suffix strings.

How does the delta badge decide its color?

deltaDirection sets which way is positive: 'up-good' colors increases as positive, 'down-good' does the opposite (useful for costs); both colors are customizable.

Can the value be text rather than a number?

Yes — value accepts a string too; combine format 'none' with prefix or suffix when you need units like '1,284 users'.

Can I add a trendline / sparkline?

Yes — send '<key>.sparkline' as an array of numbers and a mini trendline draws in a strip at the bottom; when you don't set a delta, it auto-derives the % move from the first→last value and colors itself red/green.

Free tools built on it, guides that use it, and the components that sit beside it.