Preet Suthar

AI Usage Quota

AI chats 3

About

Display AI usage and quota information.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds AI Usage Quota to your project and fits it to your theme.

Code

How AI Usage Quota is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import AIUsageQuota from "@/components/ui/ai-usage-quota";

export default function DemoOne() {
  return (
    <div>
      <AIUsageQuota
        tokenUsage={{
          input: 225_000,
          output: 178_700,
          total: 403_700,
          dailyUsageHistory: [],
        }}
        rateLimit={{
          remaining: 7,
          limit: 100,
          resetAt: new Date(),
          window: "hour",
        }}
        quota={{
          used: 9_590_000,
          limit: 10_000_000,
          resetAt: new Date(),
          period: "month",
        }}
        showUpgradePrompt={true}
        upgradeThreshold={80}
        onUpgrade={() => {
          /* upgrade logic */
        }}
      />
    </div>
  );
}

Dependencies

More by Preet Suthar

View all
  • Modern & Stunning sign in

    Modern & Stunning sign in

    1.6K
  • Shining Text

    Shining Text

    1.5K
  • Magic Text

    Magic Text

    845
  • Toolbar

    Toolbar

    822
  • Hero 2

    Hero 2

    818
  • Typewriter Text

    Typewriter Text

    769
  • AI Chat Input

    AI Chat Input

    734
  • Full Screen Signup

    Full Screen Signup

    731

More in AI chats

View all
  • AI Actions

    AI Actions

    319
  • Agent Chat

    Agent Chat

    17
  • System Message

    System Message

    54
  • Message Thread

    Message Thread

    35
  • Color Picker

    Color Picker

    81
  • AI Task List

    AI Task List

    160
  • Modal Card

    Modal Card

    101
  • Quota Banner

    Quota Banner

    21