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
avatarstring—Name for avatar initials (received messages)
timestampDate | string—Message timestamp
status"sending" | "sent" | "delivered" | "read"—Delivery status (sent messages)
children*ReactNode—Message content

ChatInput Props

PropTypeDefaultDescription
onSend*(message: string) => void—Called when user sends a message
placeholderstring—Input placeholder text
isLoadingbooleanfalseShow loading state on send button
disabledbooleanfalseDisable the input

ChatContainer Props

PropTypeDefaultDescription
classNamestring—Additional CSS classes

ChatList Props

PropTypeDefaultDescription
autoScrollbooleantrueAuto-scroll to latest message
classNamestring—Additional CSS classes

TypingIndicator Props

PropTypeDefaultDescription
classNamestring—Additional CSS classes

CodeBlock Props

PropTypeDefaultDescription
code*string—Code content
languagestring—Language label
classNamestring—Additional CSS classes

MessageGroup Props

PropTypeDefaultDescription
avatarstring—Avatar initials
variant*"sent" | "received"—Message direction
children*ReactNode—ChatBubble elements
classNamestring—Additional CSS classes