067
See where this month's credits went: a split bar by category with a warning line and a hard limit, daily spend against budget, and a plan button that gets more insistent as you close in on the cap.
akausage meter·quota·credits
Run this in any project set up for the shadcn CLI. It copies the Credit Gauge source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/credit-gauge.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { CreditGauge } from "@/components/credit-gauge";
export default function Page() {
return <CreditGauge />;
}A free React component in the Status collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Credit Gauge source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| title | string | "AI credits" |
| plan | string | "Pro" |
| categoriesrequired | CreditCategory[] | — |
| limitrequired | number | — |
| warnAt | number | 0.8 |
| dailyrequired | number[] | — |
| daysInPeriod | number | 30 |
| periodStart | Date | — |
| unit | string | "credits" |
| onUpgrade | () => void | — |
| className | string | — |