Draft. Ported from the shadcn-vue registry (style reka-nova, read 12 November 2026) and styled with Beehexa tokens. Not yet approved; the API may still change.
Message scroller is the scrolling area of a conversation. It opens at the latest message, follows new messages while the reader is at the end, stops following as soon as they scroll away, and keeps their place when older messages load above.
When to use
- A chat or a note history that grows while people read it.
- Any list read from the bottom up, where new entries arrive at the end.
When not to use
- For a page that scrolls as a whole. Let the page scroll.
- For tables or long forms. Use the page scroll or a scroll area.
- For a feed where the newest entry is at the top. That is an ordinary list.
Behaviour
- Opens at the end by default (
default-scroll-position="end"), or at the start, or at the last message markedscroll-anchor. - Follows new messages only with
auto-scroll, and only while the reader is at the end. Scrolling up with the wheel, touch or keys stops it. - Keeps the reader’s place when messages are added above (
preserve-scroll-on-prepend, on by default). - Jump button:
MessageScrollerButtonshows when there is more to read in its direction and hides at the edge. Usedirection="start"for a button at the top. - Each message takes no layout work while far off screen, so long histories stay fast.
Content
- Put one message in each
MessageScrollerItemand give it a stablemessage-id. - Name the region in the page’s language with
aria-labelon the viewport, such as “Conversation with the warehouse”. - Give the jump button a name in the page’s language (sr-only text in its slot).
Tokens
- Messages
space.400apart by default; pass a class toMessageScrollerContentfor a denser list. - Scrollbar: thin,
scrollbar.thumbonscrollbar.track, hidden while the list scrolls by itself. - Focus:
border.width.focusedincolor.border.focus, drawn inside the edge. - Jump button: a small Default Button (
size.control.small),space.200from the edge. It moves in withmotion.easing.enterand out withmotion.easing.exit. - The bottom edge fades out with a mask, so cut-off text reads as more to come.