Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Rate Limit Warning Notification Block for React

A rate-limit warning with a meter marked at 70, 90 and 100 percent, a 42-second reset countdown you can pause, and a sortable table of the six endpoints behind the traffic with their share as a bar.

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

Warn that an API key is close to its limit and show where the traffic comes from, with this rate-limit notice for React with Base UI. It is Limitloft, an API platform, in a framed panel with a plus mark on each corner. The first band reads the limit: 1,742 of 2,000 requests a minute as a headline figure, a meter with marks at 70, 90 and 100 percent in foreground weights, and the catalog Timer counting down the 42 seconds until the window resets, with a Pause. The second band is a table of the six endpoints behind the traffic, each with its requests and its share as a bar and a whole percent; pressing a head sorts by it. The foot ends in "Upgrade", the one Shine Button, a link. Guides draw the lines. For API platforms, quotas and any meter that has thresholds.

FAQ

How do I use my own limit and endpoints?

Edit LIMIT, COUNTS (each endpoint has a verb, a path and its requests in the current minute) and MARKS. The total, the percentage of the limit and each endpoint's share are worked out from them; shares are whole percents shared out by largest remainder, so the six always add to 100. In your app feed COUNTS from your metrics and restart the timer from your window's real reset time.

Does the countdown really run?

Yes, for 42 seconds, then it says the window reset in this demo and the button becomes Restart countdown; the table keeps its figures, because nothing is measured live. The digits are a clock face for the eye; the Pause button is always there and says where it paused. With reduced motion the countdown starts paused instead of running, and a visitor can start it.

How is the meter made, and is it readable without colour?

It is a native meter with an accessible name, drawn over as a bar and three marks. The fill is foreground, the marks are lines with a halo, and each is labelled with its percent underneath, so nothing depends on colour. The words about what each mark does (slowing down past 90 percent, a 429 at 100) are in the header.

How does sorting work?

Pressing a head sorts by it in its first direction (largest first for Requests and Share, A to Z for Endpoint) and pressing it again turns it round; ties fall back to the endpoint's name. The head's aria-sort and an arrow say which way, and a polite line says "Sorted by share, largest first". Every row has the same height in every order.

What happens on a phone?

The Requests column folds into each endpoint's second line ("612 a minute") and the table keeps two columns, the endpoint and its share bar, so it fits at 320 px with no sideways scroll. The timer moves under the meter.

  • Pro

    Rate Limit Error

    Blocked and limited

    A full-screen 429 for an API key over its limit: a 10 by 10 grid of the last 60 seconds of requests, the Retry-After header worked out from the oldest, and a demo clock that empties the oldest cells so Retry works.

  • Pro

    Usage Alerts Billing

    Plan and usage

    Usage alert settings: percentage thresholds as switches with number inputs, recipients as email chips, and a choice between email and a webhook, with a save that checks them.

  • Pro

    Limit Reached Billing

    Upsell and retention

    The upgrade prompt shown where someone hits a plan limit: what was blocked, the limit reached against the next plan's, a two-column comparison and Upgrade or Remind me later.

  • Pro

    Rate Limiting Settings

    API and webhooks

    A rate limit you can try: a framed strip replays one client's 24 requests over 10 seconds against the chosen algorithm, limit, window and burst, marking each request allowed or rejected and counting both.

  • Pro

    A cloud storage service's over-the-limit notice with a bar that overshoots a marked limit and a slider that works out the new limit, the monthly cost and whether the usage then fits.

  • Pro

    An infrastructure monitor's alert panel: a count of open alerts by severity, and an accordion of three systems with their facts, an Acknowledge and a one-hour Mute that says when it ends.