[data-reveal]{opacity:1!important;transform:none!important}
Meter
Components

Meter

An x-of-y bar for seats, quotas and coverage — one fill or stacked segments, with warning and error thresholds.

Meter draws an "x of y" bar: the label, a dimmed hint and the value on one line, the bar under it, then an optional legend. One value fills the bar in its tone; segments stack several fills, each with its legend label. warnAt and errorAt turn a single fill warning or error past a percentage of max.

MeterMeter
Connecting to the DMS preview…
ConnectingDMS 0.9.57 options set

Usage

src/pages/workspace.ts
import { Meter } from "@antelopejs/interface-dms/base/meter";

static storage = Meter({
  label: "$media.storage.label",
  fetchUrl: "/api/media/storage", // answers { value, max, valueLabel }
  warnAt: 80,
  errorAt: 95,
});

A meter is one measure, not a list: its route answers an object — any of value, max, segments, hint, valueLabel — rather than { items }.

Options

Options of the Meter block
OptionTypeDefaultDescription
labelContentstring–Name of the measure.
hintContentstring | object–
valueLabelContentstring | object–
legendAppearanceboolean–
formatAppearance"fraction" | "percent" | "value" | "none"–
toneAppearance"neutral" | "primary" | "secondary" | "success" | "warning" | "error" | …–
sizeAppearance"xs" | "sm" | "md"–
cardAppearancebooleanfalseDraws the block on a card; turn it off when it already sits in one.
warnAtBehaviornumber–The bar turns to a warning colour from this percent of the maximum.
errorAtBehaviornumber–The bar turns to an error colour from this percent of the maximum.
formatValue text
fraction8 / 10. The default.
percent80%
value8
noneNothing.

Pitfalls

  • value is ignored when segments is set.
  • Figures that change per request (seats used, quota left) come from fetchUrl: a page layout is built once, when the page registers. The route answers an object (any subset of the meter's fields), not { items }.
  • The meter's source declares the value arrangement, so a no-code editor can generate one (a count or a sum over a table, answering { value }) and offer it to whoever builds the page; the maximum then stays the meter's own max.

Next steps

Section & field row

Put meters in a settings section.

Stat group

Figures without a bar.