Rime

Meter and ProgressBar

A segmented meter for small counts (seats used) and a bar for progress through a total.

Meter draws one segment per unit up to max (default 5). ProgressBar is a continuous bar for larger totals. Both announce value text.

Installation

npx shadcn@latest add KezLahd/rime/meter

Also installs: base.

Usage

import { Meter, ProgressBar } from "@/components/ui";

<Meter label="Seats" value={3} max={5} valueText="3 of 5 used" />

Examples

Default

3/5Seats

API

Generated from the component's TypeScript types and JSDoc (scripts/gen-ui-registry.mjs), so it always matches the source.

Meter

Meter props
PropTypeDefaultDescription
valueRequirednumber
maxnumber5Discrete slots. The team member cap is 5.
labelRequiredstringVisible caption and the basis of the accessible name, e.g. "Slots in use".
valueTextstringSpoken value; defaults to "3 of 5".
noteReactNodeLine under the segments, e.g. "At capacity: withdraw a customer to free a slot".
size"sm" | "md""md"md = dashboard header block. sm = inline in a table cell.
classNamestring

ProgressBar

ProgressBar props
PropTypeDefaultDescription
valueRequirednumber
maxRequirednumber
labelRequiredstring
valueTextstring
classNamestring

Theme tokens

Per-component tokens are undeclared by default, so the default shown is the fallback the CSS uses. Set one at :root (or in theme.css) to restyle every instance. Live values are read from this page, so they follow the Rime Studio.

Meter and ProgressBar per-component tokens
TokenDefaultLive value
--r-flat3px / 2px…

System tokens it reads

Meter and ProgressBar system tokens
TokenDefaultLive value
--brand-deeptokens.css…
--brand-gradienttokens.css…
--brand-softtokens.css…
--danger-basetokens.css…
--danger-base-solidtokens.css…
--danger-inktokens.css…
--dur-slowtokens.css…
--easetokens.css…
--ink-headingtokens.css…
--ink-mutedtokens.css…
--ink-secondarytokens.css…
--rgb-brandtokens.css…
--rgb-brand-deeptokens.css…
--rgb-contacttokens.css…
--rgb-dangertokens.css…
--shadow-specular-darktokens.css…
--text-captiontokens.css…
--text-microtokens.css…
--tracking-eyebrowtokens.css…

Accessibility

  • role="meter" / role="progressbar" with aria-valuenow, -min, -max and aria-valuetext.

Do and don't

Do

  • Write valueText in words people use: "3 of 5 seats used".

Don't

  • Don't use a meter for a task that is in progress over time; that is a Spinner or a toast.

For AI agents

This page as markdown, rendered from the same registry entry. Point an agent at it (or add .md to this page's URL), or at /llms.txt for the index.

Open meter.md