Componentfeedback0.67 KB gzipZero dependencies

Rate Limit Note

Rate limit notice with countdown timer.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add rate-limit-note

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { RateLimitNote } from "@/components/ui/rate-limit-note"; <RateLimitNote />

Source code

rate-limit-note.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxrate-limit-note.tsx38 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface RateLimitNoteProps extends React.HTMLAttributes<HTMLDivElement> {  /** Seconds remaining until limit resets */  resetSeconds?: number;  limitLabel?: string;} /** Rate limit banner: countdown cooldown notification. */export function RateLimitNote({ resetSeconds = 60, limitLabel = "Rate limit exceeded", className, ...props }: RateLimitNoteProps) {  const [seconds, setSeconds] = React.useState(resetSeconds);   React.useEffect(() => {    if (seconds <= 0) return;    const t = setInterval(() => setSeconds((s) => Math.max(0, s - 1)), 1000);

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { RateLimitNote } from "@/components/ui/rate-limit-note"; <RateLimitNote />
PropTypeDescription
resetSecondsnumberSeconds remaining until limit resets
limitLabelstringConfigures limit label. (Default: "Rate limit exceeded")