Usage meter
A segmented bar showing how an allowance is used, with a warning near the limit.
API requests · day 9 of 31
742 / 1,000 k
At this pace you reach about 2.56M by 31 Oct: roughly $78 extra.
Within limit
When to use
- Storage, seats and quota shown as parts of a whole.
- You want a visible warning as the limit nears.
When not to use
- There is no limit; use a metric.
- Only one value matters; use a progress bar.
Installation
pnpm dlx shadcn@latest add @caliper/usage-meter
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
UsageMeter
11 props
Keyboard
- →
- Moves to the next item or value.
- ↓
- Moves to the next item or value.
- ←
- Moves to the previous item or value.
- ↑
- Moves to the previous item or value.
- Home
- Jumps to the first item or the minimum.
- End
- Jumps to the last item or the maximum.
Accessibility
It exposes group and img semantics, with aria-label, aria-pressed and aria-live kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/usage-meter.mdThe index of every part is at /llms.txt.