Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Plan Cells Rate Limit Dashboard Changelog Block for React

Three plan cells showing usage against a new hourly limit: a rolling count of requests, a progress bar with a tick at 80%, the remaining requests, the share used, the new limit with the old one struck through and the pace, with a toggle between the current hour and the peak hour.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A rate-limit dashboard for React with Base UI, written for Capgate, a fictional API quota service. A centred header states which plan is closest to its new limit, worked out from the readings. A toggle group switches every cell between the current hour and the peak hour today. Each plan sits in a frame of its own whose lines run a little past its corners: the plan name, a badge that says whether usage is past 80% (an icon and words), the requests used as a rolling number beside the limit, a progress bar with a tick at 80%, and four figures derived from the readings: what remains, the share used, the new limit with the old one struck through and the rise, and the pace. In the current hour the pace says when the limit would run out at the speed so far, or that it lasts to the reset; at the peak it gives the hour the peak began. It's built from Guides, Toggle Group, Progress, Sliding Number and Badge. The readings are example data, and the hour is fixed at 36 minutes in, not read from the clock.

FAQ

How do I change the plans and the readings?

Edit PLANS at the top of the file: each has a name, the new limit, the old limit was, the requests so far this hour (current) and in the busiest hour (peak, with when it began as peakAt). ELAPSED is how many minutes into the hour the readings are. Every share, remainder, rise and pace, and the plan named in the title, is computed from those numbers.

How is the pace worked out?

Requests so far divided by the minutes elapsed gives a rate; the requests remaining divided by that rate is the minutes until the limit runs out. If that is fewer than the minutes left in the hour the cell says "Runs out in N min", otherwise "Lasts to the reset". It is a straight-line estimate from example numbers, not a forecast.

Is anything shown by colour alone?

No. The bar is a foreground fill with a tick at 80%, labelled "80%", and the badge uses an icon and words ("Past 80%", "Under 80%"). The bar has an accessible name that states the plan, the share and the limit.

What does the toggle do?

It switches all three cells at once between the current hour and the peak hour today, rolling the used count to its new value (the digits change in place with reduced motion). A polite line says which view is showing. The cells keep the same height in both views.

What changes on a phone?

Below lg the three cells become a row that scrolls sideways and snaps, each taking most of the width; the row is a focusable, labelled scroll region so the keyboard can reach it. From lg the three sit side by side.

  • Pro

    A tabbed window of rate-limit changes by plan: one tab per plan, a table of endpoints with the old limit struck through, the new one in bold, the change as an arrow, a word and a percentage, and a pair of bars.

  • Pro

    Paired Bars Queue Metrics

    Metrics and charts

    Five message queues as rows of paired bars, the release before as an outline and the current release solid, with a three-way switch between throughput, lag and dead letters, and a header that counts the lagging queues.

  • Pro

    Release Band SLA Compliance

    Incidents and uptime

    A band of three release cells for a managed-service reporting product: uptime, p95 response and first reply with the target beside the actual, a check or a ring for each, and a breach count in each foot.

  • Pro

    Three load test runs on one 0 to 800 ms ruler: a line from p50 to p99 with marks at p50, p95 and p99 and a shared SLO line, beside each run's requests per second, error rate and a Pass or Fail badge.

  • Pro

    A framed table of API endpoints with method badges, calls used against each limit, a bar with a tick at the 80% line and a countdown to each window's reset.

  • Pro

    A gateway usage table where each route shows calls, error rate, a p50-to-p99 latency range on one scale, and a bar for its share of the rate limit.