NumberTransition
Rolling number treatment for live metrics and counters.
A tiny wrapper that crossfades one child to the next when its key changes, for value and state swaps (a status chip going Running → Done, a thumbnail, a chart). A motion primitive, not a Card.
A tiny wrapper that crossfades one child to the next when its key changes, for value and state swaps. A motion primitive, not a Card.
It swaps Running ↔ Done on its own; pause it and swap by hand. The old value blurs out while the new one sharpens in over it.
Wrap a small value and give it a contentKey; change the key to swap. fast is motion.duration200 (Paper's motion.fast), normal is motion.duration300. The outgoing value fades and blurs to 6px while the new one sharpens in; this blur is the kit's one approved exception to the transform/opacity rule. Under reduced motion there is no blur: the old value goes at once and the new one fades in over motion.duration100.
import { BlurCrossfade } from "agentic-ds-kit";From contracts/blurcrossfade.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| children | node | Yes | — | The current value. Any child: Badge, image, chart. |
| contentKey | string|number | Yes | — | Changing it triggers the swap. The outgoing layer shows the content as it was when that key arrived. |
| duration | fast | normal | No | fast | fast = motion.duration200 (Paper's motion.fast); normal = motion.duration300. No raw ms. |
| label | string | No | — | Sent to an aria-live=polite region when the content swaps, e.g. "Status: Done". |
Rolling number treatment for live metrics and counters.
Short live status copy (a running step, a loading line) with a highlight that sweeps over the text while the work runs.
Single show/hide panel.
Disclosure list for short related sections: one open at a time, or several with type multiple.