VanillaReactLight & dark468 views
A token-usage popover: a proportional segmented meter of input, output, reasoning and cached tokens with crisp mono token-type chips, an animated total count-up, an estimated cost readout and a model badge, revealed from a trigger with click-outside and Escape to close.
Get the code for free
Create a free account to copy or download the full source.
Popover component
A token-usage popover: a proportional segmented meter of input, output, reasoning and cached tokens with crisp mono token-type chips, an animated total count-up, an estimated cost readout and a model badge, revealed from a trigger with click-outside and Escape to close.
role="dialog" with an aria-labelaria-haspopup, aria-expanded and aria-controlsaria-hiddenrole="switch" with aria-checked toggled by JS:focus-visible with --ring outline on all interactive elementsprefers-reduced-motion: reduce disables all animationsOpen Token Breakdown Popover in Atheros AI Builder, pick a design system and ask the AI assistant to change the layout, copy or behaviour — the popover is regenerated against your tokens. Take the HTML, CSS, JS and React source with you, or pull it into your repo from Claude Code, Cursor or Codex over MCP.
300+ production-ready components and Atheros AI models. Every paid plan includes access to the whole Atheros — AI Builder and Learning.
Starting at $9.9 per month, billed annually