Skip to content

Entity chipPro

A named thing inside a sentence, with a monogram on a colour of its own, a status dot and a hover card.

oxyn add entity-chip

Restock Cone King in — it is cheaper than Northwind Labs.

The code is part of Oxyn Pro

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.

Get Pro

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

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

Terminal
oxyn add entity-chip

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Inline

In a sentence.

Restock Cone King in — it is cheaper than Northwind Labs.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Card

Hover card open.

Restock Cone KingTypeSupplierSinceMarch 2024Orders1,204 in — it is cheaper than Northwind Labs.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

EntityChip

PropTypeDefaultDescription
entityrequiredEntityModel—Model.
card_openboolDefault::default()Review sheets: show the hover card.

Monogram

PropTypeDefaultDescription
monogramrequiredMonogramModel—Model.
sizef3218.0Size px.
squareboolDefault::default()Square corners.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EscClose the hover card

Accessibility

  • The monogram is decorative; the chip is named by the entity.
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
TransitionDurationEasingNotes
Label swap + width180 ms fade/blur, width spring.snap 214 msease.outArc
Toggle chip fill120 msease.out
Toggle check grow214 msspring.snap
Chip press80 ms, 0.97ease.out
Entity card180 ms in, instant outease.out
Count roll280 ms (dur.digit.roll)ease.outOxyn plus
Reduced motionhalo off (static dot), swaps fade in 80 ms, no growlinear

Responsive behaviour

  • Sits inline and wraps with the sentence.
Edge cases (spec)
  • Counts above max show 99+; 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 EntityChip, Monogram from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: EntityChipEl, MonogramEl in oxyn_gpui.
  • Props to set first: entity, monogram.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI