# Token Breakdown Popover

> 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.

- Category: Popover
- Frameworks: Vanilla, React + CSS, React + Tailwind
- Design system: Tensor
- Dark mode: yes
- Access: premium (Atheros AI Pass)
- Page: https://builder.atheros.ai/components/token-breakdown
- Preview: https://d17nmjscumqk5d.cloudfront.net/builder/templates/tpl_builder_token_breakdown/preview-9a0a7699d6ce.webp

## Features

- Trigger button that toggles an anchored token-usage popover
- Proportional segmented meter across input, output, reasoning and cached tokens
- Crisp techy token-type chips with color swatches and per-kind counts
- Total-tokens and estimated-cost count-up on open
- Segmented meter sweeps in on open; honors prefers-reduced-motion
- Model badge and cost integrated into the header/hero — no bottom nav
- Scanline/grid texture, corner registration ticks and mono accents
- Click outside the popover or press Escape to dismiss it
- Responsive with no horizontal overflow down to ~360px
- Design-system-agnostic — segment ramp and accents derive from DS tokens
- Static, populated first paint: the panel ships its real content in markup (no skeleton, no async fetch); init re-renders atomically from the in-file data model, so there is no empty frame or height jump on load

## Accessibility

- **Dialog role** — The popover uses `role="dialog"` with an `aria-label`
- **Trigger semantics** — The trigger has `aria-haspopup`, `aria-expanded` and `aria-controls`
- **Decorative visuals** — The arrow is `aria-hidden`
- **Theme toggle** — `role="switch"` with `aria-checked` toggled by JS
- **Focus indicators** — `:focus-visible` with `--ring` outline on all interactive elements
- **Reduced motion** — `prefers-reduced-motion: reduce` disables all animations

## Common questions

**Which frameworks is Token Breakdown Popover available in?**

Token Breakdown Popover ships as Vanilla, React + CSS and React + Tailwind — HTML, CSS, JS and React source you can copy, download or clone into Atheros AI Builder.

**Is Token Breakdown Popover free?**

Token Breakdown Popover is a premium component. Anyone can preview it; the source, downloads and AI customisation are included with Atheros AI Pass.

**Does Token Breakdown Popover support dark mode?**

Yes. Token Breakdown Popover ships light and dark themes, both drawn from the Tensor design system's tokens. Switch the preview to dark mode to compare them.

## Get the code

Preview Token Breakdown Popover live, then sign in to copy or download the source, apply another design system, or ask the AI assistant to change it: https://builder.atheros.ai/components/token-breakdown

Every component on https://builder.atheros.ai is also reachable from Claude Code, Cursor and Codex through the Atheros MCP server (paid plans). Component index: https://builder.atheros.ai/llms-components.txt
