AsterUIDocsv1.0.2

Docs / Component reference

ChatMessage & ChatList

Lay out a conversation with a distinct author, message body and time for each turn.

Chat message example

Install

sh
npx @fierst/ui@1.0.2 add chat-message

Registry dependencies: theme, icon. Package dependencies: @lucide/icons.

Exports from ./ui/chat-message: ChatMessage, ChatList.

Download the registry source for chat-message 1.0.2.

API contracts

ts
export function ChatMessage({
  role = 'assistant',
  author,
  timestamp,
  actions,
  class: extraClass,
  children,
}: {
  role?: 'user' | 'assistant' | 'system';
  author?: string;
  timestamp?: string;
  actions?: View;
  class?: string;
  children?: View;
})

export function ChatList(props: { class?: string; children?: View })