Meter

A share of a whole as an ink bar on the series track. InlineMeter is the Allocated / Committed / Consumed / Invoiced stack: four thin bars with the percentage at a fixed width and an optional warning tick. Sparkbars is a row of bars for a small trend; the trailing bars carry ink. The fill moves by transform only.

import { Meter, InlineMeter, Sparkbars } from "@puckoops/camelot";
NameDescriptionDefaultControl
percent*
0–100; more fills the bar
number
-
013064
label
Names the meter for assistive tech
string
-
className
string
-
size
6px or 4px
"thin""default"
"default"
size

When to use

Use Meter for a measure that is not a task, such as capacity or budget used. InlineMeter compares four stages of one budget in a drawer or a row, with an optional warning tick. Sparkbars sits at the foot of a FigureCard; the trailing bars carry ink.

  • Use Progress instead for work that finishes, such as an import or a sync.
  • Use Chart instead when the trend needs axes and values.

Examples

Thin

4px, inside a row or a table cell.

Over

Over 100 fills the bar; say the real number beside it.

Stack

InlineMeter: one budget at four stages, with a tick where Consumed should raise a warning.

Allocated100%
Committed82%
Consumed64%
Invoiced41%

Trend

Sparkbars: the last three months in ink, the rest quiet.

Trend Highlight

highlight picks how many trailing bars carry ink; here only today.

All Variants

All three on a card, as they appear in a drawer.

Meter
InlineMeter
Allocated100%
Committed82%
Consumed64%
Invoiced41%
Sparkbars