@redrob-labs/ui v1.8.0 · Redrob Group Design System 2026

CostMeter

Agent harness · src/components/CostMeter/CostMeter.tsx

@deprecated Use Meter (without segments). Kept for 1.x.

What a run has spent against what it was allowed.

The tone escalates at 75% and 90% on its own, so a budget approaching its limit changes appearance without anybody remembering to set a flag. That is the whole value: a meter that only goes red when told will be green on the run that overspends.

breakdown matters because a total nobody can decompose is a number nobody can act on - the question after "we spent this much" is always "on what".

Import

import { CostMeter } from '@redrob-labs/ui';

Rendered

No rendering: the delivery ships no preview case for this one

Props

PropTypeNotes
used number
budget number
label React.ReactNode
unit string
showBudget boolean false hides the budget, for a spend with no ceiling.
tone 'default' | 'warning' | 'danger' Overrides the derived tone. Otherwise 75% is warning and 90% is danger.
breakdown CostBreakdown[] Where it went.
format (v: number) => string
className string

Exported types

CostBreakdown