Componentmedia0.54 KB gzipZero dependencies
ChatBubble
Single message bubble with tail, status ticks, and hover press feedback.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add chat-bubbleOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { ChatBubble } from "@/components/ui/chat-bubble"; <ChatBubble direction="outgoing">Message body<ChatStatus sent={true} delivered={true} read={false} /></ChatBubble>Source code
chat-bubble.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxchat-bubble.tsx54 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface ChatStatus { sent?: boolean; delivered?: boolean; read?: boolean;} export interface ChatBubbleProps extends React.HTMLAttributes<HTMLDivElement> { direction?: "incoming" | "outgoing"; children?: React.ReactNode; status?: ChatStatus;} export const ChatBubble = React.forwardRef<HTMLDivElement, ChatBubbleProps>(function ChatBubble(Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { ChatBubble } from "@/components/ui/chat-bubble"; <ChatBubble />| Prop | Type | Description |
|---|---|---|
| direction | "incoming" | "outgoing" | Configures direction. (Default: "incoming") |
| children | React.ReactNode | Child elements rendered inside the component. |
| status | ChatStatus | Semantic status indicator. |