Message Scroller
Conversation log that sticks to the bottom, shows a jump to latest pill and announces new messages politely.
pnpm dlx @glinui/cli@latest add message-scrollerQ3 revenue review
Glin assistant, 3 sources
Installation
pnpm dlx @glinui/cli@latest add message-scrollerPrefer the package?
Usage
MessageScroller keeps the log pinned to the newest turn and shows a jump pill when you scroll up.
Accessibility
- Scroll container is role="log" with aria-live="polite" so new messages are announced without interrupting.
- The container is focusable so keyboard users can scroll with arrow keys, Page Up and Page Down.
- Autoscroll only follows while the reader is at the bottom, never yanking them away from history.
- The jump pill is removed from the tab order and accessibility tree while hidden.
Keyboard Interactions
| Key | Action |
|---|---|
| Arrow Up / Down | Scroll the focused log. |
| Page Up / Page Down | Scroll by a page. |
| Tab then Enter | Activate Jump to latest when visible. |
ARIA Attributes
- `role="log"`
- `aria-live="polite"`
- `aria-relevant="additions"`
- `aria-hidden` on the hidden jump pill
Reduced Motion
Smooth scrolling is replaced with an instant jump and the pill transition is disabled.
Affected properties
scroll-behavioropacitytransformAPI Reference
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
threshold | number | No | 80 | Pixels from the bottom that still count as pinned. |
jumpLabel | string | No | "Jump to latest" | Text of the pill shown when scrolled up. |
label | string | No | "Conversation" | Accessible name of the log region. |
onAtBottomChange | (atBottom: boolean) => void | No | - | Fires when the reader leaves or returns to the bottom. |
Source
Import directly from the package or browse the source on GitHub. Click any file to view it.
Import
import { MessageScroller } from "@glinui/ui"Dependencies
@glinui/ui@phosphor-icons/reactGenerated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/message-scroller.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.
Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata
Primary Props Type
MessageScrollerProps
MessageScrollerProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
jumpLabel | string | No | "Jump to latest" | Label of the jump pill. |
label | string | No | "Conversation" | Accessible name of the log region. |
onAtBottomChange | (atBottom: boolean) => void | No | - | Fires when the stuck-to-bottom state flips. |
threshold | number | No | 80 | Distance in px from the bottom that still counts as "at the bottom". |