Stop Rebuilding UI

Shadcn.io is not affiliated with official shadcn/ui

React AI Context

React AI context component showing token usage, costs, and model limits with circular progress indicator

Ever wonder how much that conversation is costing you? This component shows token usage and costs right in the UI. There's a little circular progress indicator that shows how much of your context window you've used, and when you hover over it, you get the full breakdown—input tokens, output tokens, reasoning tokens (for o1-style models), cached tokens, and actual dollar costs. It uses tokenlens under the hood to calculate costs for pretty much any model. Super useful for power users who want to see what they're spending, or for apps where you need to warn users before they hit the context limit. Keeps everyone honest about LLM costs.

Context preview

Scroll to load preview

Installation

FAQ