Locara
← All components AI affordances

ContextMeter

Visualises context-window usage as a bar or pill, with warn/danger thresholds.

Inspired by Cursor token meter, Anthropic Workbench, OpenRouter.

Preview

What it looks like.

Context12,400 / 32,000 tokens
Context26,800 / 32,000 tokens
Context31,200 / 32,000 tokens
12.4K / 32K 26.8K / 32K
Usage

Drop it into your app.

import { ContextMeter } from '@locara/components'

<ContextMeter used={12_400} total={32_000} variant="bar" />
<ContextMeter used={26_800} total={32_000} variant="pill" />

Or copy the source into your repo: locara add context-meter