Componentmedia1.17 KB gzipZero dependencies

ChatWindow

Full chat panel with message list, input bar, and typing indicator slot.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add chat-window

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { ChatWindow } from "@/components/ui/chat-window"; <ChatWindow messages={messages} onSend={onSend} typing={typing} />

Source code

chat-window.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxchat-window.tsx158 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface ChatMessage {  id: string;  author: string;  initials: string;  body: string;  time?: string;  direction: "incoming" | "outgoing";} export interface ChatWindowProps extends React.HTMLAttributes<HTMLDivElement> {  messages?: ChatMessage[];  onSend?: (body: string) => void;  typing?: boolean;

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { ChatWindow } from "@/components/ui/chat-window"; <ChatWindow />
PropTypeDescription
messagesChatMessage[]Configures messages. (Default: [])
onSend(body: string) => voidCallback invoked on send.
typingbooleanToggles typing. (Default: false)
autoFocusbooleanToggles auto focus. (Default: false)
placeholderstringPlaceholder text shown when empty. (Default: "Message...")