274
An in-app quota state for when a team runs out of AI runs: a full meter, a countdown to the reset with rolling digits, what still works and what's paused, and an upgrade that rescales the meter in place.
akaquota·usage·limit
Run this in any project set up for the shadcn CLI. It copies the Limit Reached source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/limit-reached.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 { LimitReached } from "@/components/limit-reached";
export default function Page() {
return <LimitReached />;
}A free React component in the Empty & Error collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Limit Reached source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| used | number | 500 |
| limit | number | 500 |
| unit | string | "AI runs" |
| shortUnit | string | "runs" |
| period | string | "this month" |
| planName | string | "Team" |
| secondsUntilReset | number | 3 * 86400 + 4 * 3600 + 12 * 60 + 8 |
| resetDate | string | "Nov 1" |
| upgrade | LimitReachedUpgrade | null | { plan: "Pro", limit: 2000 } |
| stillWorks | string[] | ["Editing and comments", "Search across projects", "Exports and the API"] |
| paused | string[] | ["AI summaries", "Auto-tagging uploads", "Ask Ridgeline"] |
| upgrading | boolean | false |
| secondaryLabel | string | "Ask your admin" |
| secondaryDoneLabel | string | "Admin notified" |
| onUpgrade | () => void | — |
| onSecondary | () => void | — |
| onReset | () => void | — |
| className | string | — |