Skip to content
AI & AgentsPro

Context Meter

How full the model's context window is: a ring for the prompt toolbar or a bar with a breakdown.

Usage

Installation

bash
npm install @wunderui/react

Then import what you need:

tsx
import { ContextMeter } from "@wunderui/react"

In context

How the component is used inside real screens — the same compositions as the Usage section of the Figma page.

Context window almost full

The bar above the prompt offers to summarize the chat; the ring in the toolbar shows the same fill level.

Context window

172k of 200k tokens

  • System 6k
  • Files 98k
  • Conversation 68k

Nearly full — older messages get summarised next.

API Reference

PropTypeDefault
used / limitnumber—
breakdown{ label: string; tokens: number; className?: string }[]none
variant"ring" | "bar""ring"
labelstring"Context window"
warnAtnumber0.8
warningReactNode"Nearly full — older messages get summarised next."