Componentmedia0.54 KB gzipZero dependencies

ChatBubble

Single message bubble with tail, status ticks, and hover press feedback.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add chat-bubble

Or install the full npm package:

npm install bigbullui

Usage

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 helper

Zero 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 />
PropTypeDescription
direction"incoming" | "outgoing"Configures direction. (Default: "incoming")
childrenReact.ReactNodeChild elements rendered inside the component.
statusChatStatusSemantic status indicator.