ActivityTicker
Crossfading single line of text.
Searching the web
Why not just swap the text
Both the outgoing and incoming lines are in the DOM during the transition, stacked in the same grid cell. The row is therefore always as tall as the taller of the two, and as wide as it needs to be, throughout the fade.
Replacing the text in place instead makes a list of activity rows jitter every few seconds as the words change length — a small thing that is very visible when several rows are animating at once.
API
| Prop | Type | Default | Description |
|---|---|---|---|
text* | string | — | Current line. Changing it slides the old line out and the new one in. |
className | string | — | — |
durationMs | number | 220 | Transition duration in milliseconds. |
style | CSSProperties | — | Merged over the duration custom property the transition reads. |
Next
- ActivityMark — what a tool call looks like
- Chat stream — a status line with a face