Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Message Scroller

Preview

What should the first release include?
Start with the smallest workflow that still feels complete.
Include streaming and recovery states too.
Yes. Those states make the first version feel dependable.
How should we present tool results?
Keep results close to the action that produced them.
What about actions that need confirmation?
Pause the run, explain the impact, and ask before continuing.
Can the transcript stay easy to navigate?
Use the rail to jump between turns without losing your place.

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/message-scroller

Import the shared styles once in your application.

TSUsage
import MessageScroller from '@/components/beui/agents/MessageScroller.vue'
import '@/components/beui/styles.css'

API Reference

followOutput?
boolean

Keep streamed output pinned while the reader remains near the end.

Defaulttrue
followThreshold?
number

Distance from the end that still counts as following the output.

Default56
smooth?
boolean

Smoothly follow growing content.

Defaulttrue
@follow-change?
(following: boolean) => void

Reports when the reader leaves or returns to the live edge.

Default—
label?
string

Accessible label for the scrollable transcript.

Default—
busy?
boolean

Marks the transcript as waiting for more streamed content.

Default—
navigation?
"rail"

Adds a compact rail for navigating between rendered Message rows.

Default—
navigationLabel?
string

Accessible label for the optional message navigation rail.

Default—
viewportClassName?
string
Default—
contentClassName?
string
Default—
railClassName?
string
Default—
viewportRef?
((node: HTMLElement | null) => void) | { value: HTMLElement | null } | null

Mirrors the React `viewportRef`: a callback or a ref-like object.

Default—
viewportProps?
{ onScroll?: (event: Event) => void onWheel?: (event: WheelEvent) => void onTouchStart?: (event: TouchEvent) => void onKeyDown?: (event: KeyboardEvent) => void [key: string]: unknown }

Extra attributes for the scrollable section. Handlers are composed, not replaced.

Default—
contentProps?
Record<string, unknown>

Extra attributes for the log container.

Default—
labels?
Partial<MessageScrollerMessages>

Override any built-in string.

Default—
className?
string
Default—
#default?
slot
Default—

Composition

Keep the scrolling viewport outside the message primitives it follows.

MessageScroller
└── MessageGroup
    └── Message
        └── MessageContent

Note: Message provides stable, semantic rows for the transcript. Prompt Input starts new turns without owning transcript movement. Streaming Response supplies the growing content the viewport follows.

How it works

A streaming transcript is not ordinary overflow. It must follow new output while the reader stays at the live edge, then stop moving the moment they choose to inspect earlier work.

Also on React Native. Follows new output and lets go when you scroll up.(opens in a new tab)

Updated