Message scroller: Group chat
Anchors don't have to be messages. Here a <Marker /> for someone joining starts the turn. Scroll up, receive messages, and the jump button counts what arrived while you were away.
This adds the example as components/examples/message-scroller/group-chat.tsx, together with the Message scroller component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/message-scroller-group-chat.jsonTo add only the component, follow the Message scroller installation.
Props in this example
The Message scroller props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
autoScrollFollow new messages while the reader is at the bottom. | boolean | false |
| Prop | Type | Default |
|---|---|---|
aria-labelNames the conversation region. | string | – |
| Prop | Type | Default |
|---|---|---|
messageIdStable id for following, anchors and counts. | string | – |
scrollAnchorScroll this item to the top when it arrives, with defaultScrollPosition="last-anchor". | boolean | false |
Every prop is in the Message scroller API reference.
See them all, with keyboard support and accessibility notes, on the Message scroller page.
- ButtonButtons in every variant and size, with a built-in loading, success and error flow that skips the spinner for fast requests.
- MotionThe easing curves, durations and reduced-motion check every component animates with, plus hooks for size morphs and sliding highlights.
- MessageA chat message row with an avatar, name, bubbles and status, where new messages rise in from the sender's side.
- AttachmentFile and image cards for uploads, with progress, states, actions, a full-card trigger and names that keep their extension.
- BubbleChat message bubbles with variants, grouped corners, reactions and room for interactive content.
- MarkerQuiet notes between content, like date dividers and system events, with sticky dates and times that read as Today or Yesterday.