Vibe UI
Initializing Vibe UI System...

Message Scroller

A chat scroll container that anchors turns, opens saved transcripts, follows streamed responses, loads history without jumping, and jumps to any message.

Message Scroller

A chat scroll container that anchors turns, opens saved transcripts, follows streamed responses, loads history without jumping, and jumps to any message.

Preview

New Chat

How can I help you today?

ME
I'm building a chat app and the scroll behavior is jumping around when streaming responses.
AI
Wrap your message list in MessageScroller — the viewport pins to the bottom as new messages arrive.
ME
Does auto-scroll pause if I scroll up to read earlier history?
AI
Yes! The moment you scroll up, auto-scroll pauses and MessageScrollerButton appears so you can return anytime.
Press send to test auto-scrolling behavior.

Installation

pnpm dlx vibe-ui-kit@latest add message-scroller message input button dropdown-menu
💡 Vibe UI Component Dependencies: This component requires other components to work correctlyPlease make sure you also install these Vibe UI component dependencies: message, input, button, dropdown-menu

Streaming

Simulates real-time AI response token streaming (word-by-word text assembly). MessageScroller continuously keeps the viewport pinned to the live edge as text expands.

Streaming Messages

Auto-scroll follows the live edge as tokens stream in word-by-word.

ME
How does MessageScroller handle live streaming AI text?
AI
MessageScroller detects new content as tokens land in the viewport. When autoScroll is active, it automatically keeps the newest text in view without jarring page shifts.
Streaming is simulated word-by-word. Auto-scroll follows the live text edge.

Props

MessageScroller

PropTypeDefaultDescription
variant"default" | "glass" | "retro" | "glow" | "cyberpunk""default"Visual style preset of the scroller frame container.
thresholdnumber150Pixel distance threshold from bottom edge before auto-scrolling triggers.

MessageScrollerViewport

PropTypeDefaultDescription
classNamestring-Additional CSS classes applied to the scrollable viewport element.

MessageScrollerContent

PropTypeDefaultDescription
classNamestring-Additional CSS classes applied to the message items flex container.

MessageScrollerItem

PropTypeDefaultDescription
classNamestring-Additional CSS classes applied to individual message item rows.

MessageScrollerButton

PropTypeDefaultDescription
classNamestring-Additional CSS classes applied to the floating scroll-to-bottom action button.

Contributors

JS
Jenish Sabhadiya

Theme Customizer

8px
@theme {
  --radius: 0.5rem;
  --glass-blur: 8px;
}
Changes apply instantly to this documentation workspace.
Message Scroller | Vibe UI