Overview
Type lines with CSS. When content exceeds the viewport, lerp the scroller toward the newest line.
Build
- 01
CSS typewriter per line.
- 02
Measure content height vs viewport.
- 03
Lerp scrollY toward the tail.
- 04
Optional fade of the scene at the end.
el.addFrameTask((t) => {
const y = lerp(y, contentH(t) - viewH, 0.35)
})Example source React / TSX
examples/streaming-log-follow.tsx · Uses the catalog’s shared composition helpers.
Loading source…