ActivityTicker
交叉淡入的单行文字。
正在搜索网页
为什么不直接换文字
过渡期间出站和进站两行都在 DOM 里,叠在同一个网格格里。因此整行始终和两者中较高的那一行一样高,也和它需要的宽度一样宽。
就地替换文字会让活动行每隔几秒因为字数变化而抖动——小事,但好几行同时动时非常显眼。
API
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
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. |
接下来
- ActivityMark——一次工具调用长什么样
- 对话流——一行带脸的状态