Chat

@allem-ui/chat

AI chat interface components — message bubbles, typing indicators, auto-resizing input, and code blocks.

Installation

npm install @allem-ui/chat

Components

ChatContainer + ChatList + ChatBubble

Compose a full chat interface with message bubbles, auto-scrolling, and input.

A
Hello! How can I help?
Tell me about Allem UI
A
Allem UI is the most complete React component library!

TypingIndicator

Animated three-dot indicator showing someone is typing.

CodeBlock

Syntax-styled code block with language label and copy button, designed for chat messages.

typescript
const greeting = "Hello, Allem UI!";
console.log(greeting);

ChatBubble Props

PropTypeDefaultDescription
variant*"sent" | "received"Message direction
avatarstringName for avatar initials (received messages)
timestampDate | stringMessage timestamp
status"sending" | "sent" | "delivered" | "read"Delivery status (sent messages)
children*ReactNodeMessage content

ChatInput Props

PropTypeDefaultDescription
onSend*(message: string) => voidCalled when user sends a message
placeholderstringInput placeholder text
isLoadingbooleanfalseShow loading state on send button
disabledbooleanfalseDisable the input

ChatContainer Props

PropTypeDefaultDescription
classNamestringAdditional CSS classes

ChatList Props

PropTypeDefaultDescription
autoScrollbooleantrueAuto-scroll to latest message
classNamestringAdditional CSS classes

TypingIndicator Props

PropTypeDefaultDescription
classNamestringAdditional CSS classes

CodeBlock Props

PropTypeDefaultDescription
code*stringCode content
languagestringLanguage label
classNamestringAdditional CSS classes

MessageGroup Props

PropTypeDefaultDescription
avatarstringAvatar initials
variant*"sent" | "received"Message direction
children*ReactNodeChatBubble elements
classNamestringAdditional CSS classes