Component libraryContext meter

Context meter

Pro

Inspect supplied token usage, response reserve and remaining context capacity.

npx shadcn@latest add @tidal-pro/context-meter
Desktop viewport

Installation

Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.

Terminal
npx shadcn@latest add @tidal-pro/context-meter

Import components/ui/tidal.css, components/ui/context-meter.css, components/ui/meter.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.

Usage

Complete example source · Dependency and asset manifest

Loading the complete example…

API & behavior

Consumer-supplied safe integer used/capacity/reserved counts, unknown usage as null, optional warningRatio and token breakdown. The native Meter shows exact used counts with a capacity-saturated visual; the reserved response allowance is separate, and remaining input capacity subtracts both. Overflow is explained numerically. Breakdown IDs are unique and sums cannot exceed known usage; residual usage is labelled Other context. Unknown usage requires an empty breakdown. Known status remains visible when title is omitted. Optional title/description and h2-h6 heading level, token formatter, localized labels, root section props/ref and native meterRef are supported. Native details reveals the breakdown. Invalid counts show a configuration alert. No tokenization, model discovery, pricing, request, provider call, persistence or estimation is bundled.

Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.

Building with an agent?Give it the installation guide and component catalog.