Rate Limit Dashboard
API rate-limit dashboard listing each endpoint's request quota for the current window, with a usage bar that shifts from green to amber to red as it approaches the limit and a reset countdown label. Perfect for an API status page or a developer-facing usage panel.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/rate-limit-dashboard.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/devtools/devtools10.tsx instead.
Usage
The file also exports devtools10Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Devtools10, devtools10Demo } from "@/components/blocks/devtools/devtools10"; export default function Page() { return <Devtools10 {...devtools10Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Rate limits" | Section heading. |
| description | string | "Request quota usage per endpoint for the current window." | Section intro text below the heading. |
| endpoints | RateLimitEndpoint[] | none | The endpoints rendered as rows, in the order given. |
| className | string | none | Extra classes for the outer section element. |
Types
type RateLimitEndpoint = { path: string; method: string; used: number; limit: number; resetLabel: string; };
Behavior notes
- The usage bar's fill percentage and color are both computed at render time from used / limit (a pure function of the fixed props you pass), not from any client-side state: under 70% is emerald, 70-89% is amber, 90%+ is red.
- resetLabel is an opaque display string (e.g. "12m", "3m"); there is no live countdown timer, so it will not tick down on its own.
- The rows have no links, sorting, or filtering; it is a static, read-only snapshot each time it renders.
- method is shown as a plain badge-like label to the left of the path and accepts any string, so non-REST verbs or custom labels render fine too.
More DevTools Blocks
View all →api-endpoints-sample-call
API Endpoints With Sample Call
Reference list of API endpoints paired with a live sample request and response panel.
cicd-pipeline-status
CI/CD Pipeline Status
Recent CI/CD pipeline runs with per-stage status chips and overall run badges.
code-diff-viewer
Code Diff Viewer
Unified code diff panel with a file header change summary and colored addition/deletion lines.
keyboard-shortcuts-reference
Keyboard Shortcuts Reference
Grouped keyboard shortcut reference with keycap-styled key combos.
performance-waterfall
Performance Waterfall
Network request waterfall chart with cascading timing bars colored by duration.
service-health-board
Service Health Board
Infrastructure status board with a live summary strip and per-service uptime, latency, and health.