The MessageList component handles the display and scroll behavior of chat messages. It provides intelligent auto-scroll management, loading states, and UX features like a “scroll to bottom” button when users scroll up.Documentation Index
Fetch the complete documentation index at: https://osmium.intface.io/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Install the MessageList component using the shadcn CLI:Usage
Props
Array of chat messages to display. Uses the standard UI message format from AI SDK.
The current chat status. Controls loading indicators and UI states.
Reference to the main scrollable container element.
Reference to the last user message element for scroll positioning.
Reference to the last assistant message element for scroll positioning.
Reference to the bottom sentinel element used for scroll detection.
Function to scroll the list to the bottom.
Whether the user is currently scrolled to the bottom of the list.
Height of the chat container in pixels. Used for dynamic spacing calculations.
The role of the last message in the list. Affects spacing calculations.

