Meter
import { Meter, MeterList, MeterListGroup, fmtLeft, leftTone, fmtReset, formatBytes } from "@arcadia/ui";Room left: neutral
15% or under: warning
Spent: danger
off: a sign-in to renewunknown: nothing reportedpending: not read yetbusy: working on itstale: an old numberemphasis: strong, normal, quietmuted: room, low, spentIn parts
Five accounts52% left
As a row
A grid
Claude1 of 4 open
5-hourin 1h 15m WeeklySat 12:25
A capacity
27 MB of 250 MB used, 223 MB free. Images 19 MB, Files 6.1 MB, Exports 2.5 MB.
Meter
valuerequired- number
- What is left, 0..100 (clamped), never what is used.
held- number
- What comes back with it, 0..100: a faint second fill, drawn on a spent track too.
marker- number
- A reference mark on the remaining scale (for example where steady pace stands). Shown inside (0, 100) on a level bar and omitted on a stale one (H185).
tone- "neutral" | "warning" | "danger"
- Default:
"neutral" warning(yellow fill) at 15% left or under;danger(a red track) once spent.size- "sm" | "md"
- Default:
"md" md(4px) orsm(2px, a dense row).state- "level" | "off" | "unknown" | "pending" | "busy" | "none"
- Default:
"level" - What the bar says when it is not a level.
emphasis- "strong" | "normal" | "quiet"
- Default:
"normal" - The fill's rank among neighbouring meters.
stale- boolean
- The number is old (the last read failed): the bar steps back.
dim- boolean
- Another meter of its group has the pointer: this one goes quiet.
muted- boolean
- Every ink a step quieter, for a glance in the app's chrome such as a sidebar: the fill a little over the track, a spent track a dim red, a low fill a dim yellow.
label- string
- Accessible name ("Weekly"): with one the bar is a
meter, without it is decorative. valueText- string
- Spoken value: "52% left, resets October 11 at 16:37". Default: the rounded value with "left".
rootStyle- RootStyle<MeterKnobs>
- Typed StyleX override: layout and the
--meter-*knobs.
segmentsrequired- readonly MeterSegment[]
- One to fifteen, in drawing order; dense past five.
size- "sm" | "md"
- Default:
"md" - A level's
size, for every segment. active- string | null
- The segment with the pointer: it keeps its ink, the others go quiet.
onActiveChange- (id: string | null) => void
- The pointer came to a segment, or left the bar (
null). label- string
- Accessible name ("ChatGPT accounts"): with one it is a
groupof its labelled segments. muted- boolean
- Every segment a step quieter: a level's
muted. rootStyle- RootStyle<MeterPartsKnobs>
- Typed StyleX override: layout and the
--meter-parts-*knobs.
namerequired- string
- "Weekly": with
scope, the bar's accessible name. scope- string
- Whose window it is, where one thing has its own ("Deep").
detail- string
- The circumstance ("Resets in 3h"): the first to give way.
figure- string
- What is left, in words ("64% left"): never cut.
action- ReactNode
- A button or link in the figure's place. As a row's
faceit has none: the row's ownactionstands there. value- number
- Default:
0 - What is left, 0..100.
segments- readonly MeterSegment[]
- A bar in parts instead of one level.
active- string | null
- The segment with the pointer: it keeps its ink and the others go quiet.
onActiveChange- (id: string | null) => void
- The pointer came to a segment, or left the bar (
null). held- number
- A level's
held. marker- number
- A level's
marker. tone- "neutral" | "warning" | "danger"
- Default:
"neutral" - A level's
tone, which the figure takes too. state- "level" | "off" | "unknown" | "pending" | "busy" | "none"
- Default:
"level" - A level's
state. emphasis- "strong" | "normal" | "quiet"
- Default:
"normal" - A level's
emphasis;quietquiets the figure too. stale- boolean
- A level's
stale. valueText- string
- Default: the figure, then the detail.
onClick- () => void
- Makes the whole row a button (ignored inside a disclosure face or when
actionis set). clickLabel- string
- Accessible name for an interactive row; defaults to the row's label and spoken value.
rootStyle- RootStyle
- A component's typed override prop:
Layoutand its documented knobs, each the references it takes or another kit knob of its kind; anything else is a type error at the call site (STYLEX.md).
rowsrequired- readonly MeterGridRow[]
- The windows, a row each, top to bottom: its label, its end and its segments by column id.
active- string | null
- The column being read, in every row at once.
onActiveChange- (id: string | null) => void
- The pointer or the arrows came to a column, or left (
null). labelrequired- string
- The grid's accessible name ("Claude usage").
columnLabel- (id: string) => string
- A column's spoken name. Default: its id.
size- "sm" | "md"
- Default:
"md" - A level's
size, for every segment. rootStyle- RootStyle<MeterGridKnobs>
- Typed StyleX override: layout and the
--meter-grid-*knobs.
usedrequired- number | undefined
- What the room holds: bytes, or a count with
format. Passed asundefined, the part holds its place, a line over a bar, for an amount not read yet. Always passed: it is what makes a meter a capacity. pending- boolean
- The amount is still being read: the place holds a line and a bar, with the kit's
Skeletons in them. With nousedthe place stands whether or not the bones show, so a read does not move the page when it lands. limit- number | null
- The most it holds, in
used's unit. Left out ornull: no limit, so no bar and one line, "27 MB used". It may fall under what the room holds already: the bar stays full and nothing is hidden. kinds- readonly MeterKind[]
- What it holds by kind, in the product's own order, kept as sizes change: the first takes
--chart-1, the second--chart-2, so a kind keeps its colour. The bar and the legend draw them largest first. Past six the rest are one part, Other, and so is whatusedholds beyond the kinds. format- ((n: number, round?: ByteRounding) => string) | MeterUnit
- Default:
formatBytes - How an amount is written. "27 MB". A counted thing passes its unit's words, a
MeterUnit, and the unit is said once: "7 of 10 seats used", a legend of plain counts. Passed"up"for what is used or over,"down"for what is free and"nearest"for the limit, so a room never reads emptier or freer than it is. usedText- (used: string, limit: string | null) => string
- Default:
"27 MB of 250 MB used" - The words of what is used, from the amounts as written. And "27 MB used" with no limit.
freeText- (free: string) => string
- Default:
"223 MB free" - The words of what is free.
fullText- string
- Default:
"Full" - The word for no room left.
overText- (over: string) => string
- Default:
"Over by 62 MB" - The words of how far past the limit.
otherText- string
- Default:
"Other" - The name of the kinds past the sixth, with what
usedholds beyond the kinds. rootStyle- RootStyle
- Typed StyleX override: layout.
Rest props go to HTMLAttributes<HTMLDivElement>.
label- string
- Its accessible name.
rootStyle- RootStyle
- A component's typed override prop:
Layoutand its documented knobs, each the references it takes or another kit knob of its kind; anything else is a type error at the call site (STYLEX.md).
namerequired- string
- "OpenAI": with
detail, the group's accessible name. detail- string
- After the name ("ChatGPT Plus").
action- ReactNode
- At most one control, at the end.
rootStyle- RootStyle
- A component's typed override prop:
Layoutand its documented knobs, each the references it takes or another kit knob of its kind; anything else is a type error at the call site (STYLEX.md).