Value pillPro
An inline value in a sentence ("7 days") with a tone and an optional delta arrow that knows whether up is good.
oxyn add value-pillp95 latency is after the cache change.
The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Small labels that carry meaning at a glance: a run's status, an unread count, a model's version, a filter, a number inside a sentence ("restock in 7 days"), a company or person the agent is talking about.
- These are the only chrome pieces allowed to carry colour, and only when the colour *is* the meaning (status, agent identity, monogram).
When not to use
- A dot and a label for any of the 13 agent states, as a pill, inline or a dot alone: use Status indicator instead.
- Initials on a colour of their own, a pixel mark for agents with a ring that follows the agent state, presence, a model badge, a progress ring and an overlapping group with +N: use Avatar instead.
- Numbers that roll digit by digit like an odometer, or count up through the values in between: use Number Ticker instead.
Installation
Value pill is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add value-pillUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Delta
Latency went down: good.
p95 latency is after the cache change.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Tone
A plain toned value.
p95 latency is after the cache change.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
ValuePill
| Prop | Type | Default | Description |
|---|---|---|---|
valuerequired | String | — | Text ("7 days"). |
tone | String | "neutral" | `neutral` · `green` · `orange` · `red` · `accent` (or any badge tone). |
delta | Option<(f64, f64)> | Default::default() | Previous numeric value and the current one, for the delta arrow. |
good_up | bool | true | Up is good (green) or bad (red, for cost and latency). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| — | Not focusable |
Accessibility
- The accessible name carries the value and the direction word, not only the arrow colour.
From the spec
Colour is never the only signal: badges carry words, live badges add "(in progress)", deltas speak "up / down". Toggle chips use aria-pressed; removable chips are a focusable group whose × button is named "Remove {label}". The entity card is linked with aria-describedby and closes on Esc. Tone foregrounds meet 4.5:1 on their soft backgrounds in both themes.
Motion & interaction
- Live dot: a soft halo grows out of the dot (scale 1 → 2.6) and fades every 1.8 s — nothing Else moves.
- Label change (Arc): the new label rises in from a short blur while the pill width springs. Passive reflows (font swap) resize instantly.
- Toggle chip: the check grows in from zero width (
spring.snap), the label slides over, the fill inverts in 120 ms; press 0.97. - Entity card: fades and lifts 5 px in 180 ms; leaves at once.
- Count roll (Oxyn plus) uses the number ticker's digit roll when a count changes.
Timing
| Transition | Duration | Easing | Notes |
|---|---|---|---|
| Label swap + width | 180 ms fade/blur, width spring.snap 214 ms | ease.out | Arc |
| Toggle chip fill | 120 ms | ease.out | |
| Toggle check grow | 214 ms | spring.snap | |
| Chip press | 80 ms, 0.97 | ease.out | |
| Entity card | 180 ms in, instant out | ease.out | |
| Count roll | 280 ms (dur.digit.roll) | ease.out | Oxyn plus |
| Reduced motion | halo off (static dot), swaps fade in 80 ms, no grow | linear |
Responsive behaviour
- Sits on the text baseline and wraps with the sentence.
Edge cases (spec)
- Counts above
maxshow99+; zero counts still render (badges are explicit), unlike the reaction bar's hide-zero rule. - Long chip labels truncate with an ellipsis at the host's max width; the full text is the name.
- Names with one word → one initial; punctuation and emoji are skipped (
initials("Jean-Luc Picard")= "JP"; empty = "?"). - The same name always gets the same monogram colour (
seed_index, case- and space-insensitive). - Inline pills sit on the text baseline (
vertical-align: middle) and never change line height. - High contrast theme: soft fills gain a 1 px border through the tokens.
Notes for AI
- Import
ValuePillfromoxyn_dioxusand includePRIMITIVES_CSSplus the token stylesheet once. - A GPUI version exists:
ValuePillElinoxyn_gpui. - Props to set first:
value. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.