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

    846
  • Toolbar

    Toolbar

    825
  • Hero 2

    Hero 2

    819
  • Typewriter Text

    Typewriter Text

    773
  • Full Screen Signup

    Full Screen Signup

    739
  • AI Chat Input

    AI Chat Input

    734

More in AI chats

View all
  • AI Actions

    AI Actions

    320
  • System Message

    System Message

    56
  • Message Thread

    Message Thread

    38
  • AI Task List

    AI Task List

    161
  • Chat Bubble

    Chat Bubble

    185
  • Color Picker

    Color Picker

    89
  • Message With Header And Delivery Status

    Message With Header And Delivery Status

    38
  • Code Block

    Code Block

    8