Usage forecast
ProDaily usage with a projected month-end total and cost.
pnpm dlx shadcn@latest add @caliper/usage-forecastAt about 76,714 requests a day you will use 2,021,429 by Oct 31, around $2,576.43, within your limit of 2,400,000.
| Day | requests that day | Running total |
|---|---|---|
| Oct 1 | 38000 | 38000 |
| Oct 2 | 41000 | 79000 |
| Oct 3 | 36000 | 115000 |
| Oct 4 | 52000 | 167000 |
| Oct 5 | 61000 | 228000 |
| Oct 6 | 44000 | 272000 |
| Oct 7 | 39000 | 311000 |
| Oct 8 | 47000 | 358000 |
| Oct 9 | 55000 | 413000 |
| Oct 10 | 63000 | 476000 |
| Oct 11 | 71000 | 547000 |
| Oct 12 | 58000 | 605000 |
| Oct 13 | 49000 | 654000 |
| Oct 14 | 66000 | 720000 |
| Oct 15 | 74000 | 794000 |
| Oct 16 | 69000 | 863000 |
| Oct 17 | 81000 | 944000 |
| Oct 18 | 77000 | 1021000 |
| Oct 19 | 62000 | 1083000 |
| Oct 20 | 70000 | 1153000 |
| Oct 21 | 86000 | 1239000 |
| Oct 22 | 92000 | 1331000 |
When to use #
Use it for
- Warning customers that they are heading over a limit.
- Showing the cost of staying on course.
Skip it when
- There is too little history to project.
Installation #
pnpm dlx shadcn@latest add @caliper/usage-forecast
Adds its 4 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.
Usage #
Import it from your copy of the source. The example behind the preview comes with the source.
import { UsageForecast } from "@/components/ui/usage-forecast"
The worked example comes with Pro
The 13-line example behind the preview opens here with a Pro or Team licence.
API reference #
UsageForecast
component
Accessibility #
It exposes img and status semantics, with aria-label and aria-hidden kept in step with state. Changes that matter are announced through a live region.
No custom key handling; Tab and the native activation keys do the work.
Motion #
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.