About
A progress-bar style meter that shows how much of an AI model's context window is used, broken down by category (system prompt, conversation, files, tools, reserved output) with hover/click highlighting and a compact ring variant.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Context Meter to your project and fits it to your theme.
Code
How Context Meter is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { ContextMeter, SAMPLE_CONTEXT } from "@/components/ui/context-meter";
export default function ContextMeterDemo() {
return (
<div className="flex min-h-[420px] w-full flex-col items-center justify-center gap-8 bg-[#111111] p-8">
<ContextMeter segments={SAMPLE_CONTEXT} limit={160000} />
<ContextMeter
segments={SAMPLE_CONTEXT}
limit={160000}
variant="compact"
defaultOpen
/>
</div>
);
}
















