Skip to main content
Version: Next

AIMessages

AIMessages renders a scrollable conversation feed for AI chat interfaces. It displays message bubbles, supports automatic scrolling, thinking states, jump-to-bottom controls, and customizable empty states.

AI session established.
You
You12:00 PM
Can you show me a simple CSS grid layout?
Assistant
Assistant12:00 PM
Sure! Here is a simple grid setup: ```css .container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; } ```

Installation

ignix add component ai-messages

Usage

Import the component:

import { AIMessages } from '@mindfiredigital/ignix-ui';

Basic Example

Provide an array of messages:

const messages = [
{
id: "1",
role: "user",
content: "What is HTML?",
},
{
id: "2",
role: "assistant",
content: "HTML stands for HyperText Markup Language.",
},
];

<AIMessages messages={messages} />;

With Thinking Indicator

Display a typing/thinking state at the bottom of the feed:

<AIMessages
messages={messages}
isThinking={true}
/>

Custom Empty State

<AIMessages
messages={[]}
emptyState={
<div className="flex flex-col items-center justify-center p-12">
<p className="text-neutral-500">Ask a question to begin.</p>
</div>
}
/>

Props

PropTypeDefaultDescription
messagesAIMessagesItem[][]The array of message bubble objects to render (required)
variant'default' | 'dark' | 'glass' | 'minimal''default'Feed background theme (also inherits to child bubbles)
isThinkingbooleanfalseShows a thinking indicator at the bottom of the scroll view
thinkingNodeReact.ReactNodeundefinedCustom element override for the thinking indicator slot
emptyStateReact.ReactNodeundefinedCustom empty state graphic rendering when no messages exist
autoScrollbooleantrueAutomatically scrolls to the bottom on incoming messages if already near the viewport end
showJumpToBottombooleantrueDisplays a floating overlay shortcut to scroll back down when manually scrolled upwards
jumpToBottomButtonReact.ReactNodeundefinedCustom layout override for the floating jump-to-bottom chevron button
messageBubblePropsOmit<AIMessageBubbleProps, "role" | "content">undefinedProps passed to every AIMessageBubble (e.g. shape, showCopy, animateEntry).