Skip to content
Design System
GitHub

Message scroller

v0.64.0, changelogBeta

A conversation's scrolling log that follows the newest turn at the bottom, offers Jump to latest, holds still when older turns load, and reads each complete turn once.

System

The assistant can read robot states, the schedule and open incidents. It cannot move robots.

YouKai Chen

Which robots can cover the loading bay tonight?

Toolrobots.forecast
  1. Read robot states robots.list Done900 ms
  2. Forecast battery for each route robots.forecast Done1715 ends at 31 %, 9E37 at 44 %4.1 s
AssistantFleet assistant
Done in 2.4 s

Two can. Patrol dog 1715 is free after its car park round at 23:40 and ends the night at 31 % battery.

Patrol dog 9E37 is free too, but it is still waiting at door C3, so it would start late.

Large 2.4 s 1,204 tokens

YouKai Chen

Draft the change for 1715 and keep 25 % in reserve.

AssistantFleet assistant
Done in 3.1 s

Here is the draft: 1715 takes the loading bay from 23:40 to 05:30 and skips bay C after 03:00, which keeps it at 27 % at the end of the night. The schedule is not changed until you approve it.

Large 3.1 s 1,630 tokens

Enter sends, Shift+Enter starts a new line
Write a message or attach a file to send

0 / 4,000

Conversation

Install
npx shadcn add @syncrobotic/message-scroller

Also installs: lucide-react@^1, @syncrobotic/cn, @syncrobotic/button, @syncrobotic/format-number, @syncrobotic/use-presence, @syncrobotic/use-reduced-motion

Overview

When to use

  • The middle of an assistant panel, between its header and the prompt composer.
  • A side copilot in a Sheet, in a flex column that ends with the composer.
  • Any conversation that grows at the bottom while someone reads further up.

Use something else

  • Lines a program writes as it runs: Log viewer.
  • A fixed list people scroll without anything arriving: Scroll area.
  • Events in time order with no conversation: Timeline.

More examples

States and real uses. Each example is also a Storybook story and a visual regression test.

Streaming

Load earlier

Empty

Traditional Chinese (zh-TW)

Usage rules

  • The scrolling box of a conversation: Message turns as its direct children, oldest first. Give it a height (className: h-96, or min-h-0 flex-1 in a column).
  • It follows the newest turn while the reader is at the bottom, also while an answer streams, and lets go the moment they scroll up. Do not scroll it yourself as tokens arrive.
  • Jump to latest shows whenever the reader is away from the bottom, with how many turns came since ("3 new"); it glides back, or jumps under reduced motion, and leaves focus on the conversation.
  • Sending a turn of one's own (a Message with role="user" appended) always goes back to the bottom.
  • Older turns: hasEarlier and onLoadEarlier show Load earlier at the top; put the older turns in front of children and the view stays where it was.
  • Leave the reading to it: the log's own live region is off, StreamingText reads answers in sentences, and the scroller reads a turn once only when it arrives complete. Never add aria-live to the turns.
  • Pass empty for a new conversation: an EmptyState, with suggested prompts as chips.

Changelog

  • 0.64.02026-12-01Formatted with Prettier (class order sorted); the code is unchanged.
  • 0.53.02026-11-27Its doc opens with its description, word for word; the code is unchanged.
  • 0.51.02026-11-27Comments trimmed to what they need to say; the code is unchanged.

How to upgrade