Cameron Kelliher

AI Message Bubble

AI chats 17

About

Chat message bubble with user and assistant roles, provider avatars, timestamps, streaming cursor, and copy-on-hover.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds AI Message Bubble to your project and fits it to your theme.

Code

How AI Message Bubble is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import { AiMessageBubble } from "@/components/ui/message-bubble";

export default function Default() {
  return (
    <div className="flex min-h-svh w-full items-center justify-center bg-background p-6 text-foreground">
      <div className="flex w-full max-w-md flex-col gap-6">
        <AiMessageBubble
          role="user"
          content="What's the difference between let and const in JavaScript?"
          timestamp={new Date()}
        />
        <AiMessageBubble
          role="assistant"
          provider="anthropic"
          content={`Both declare block-scoped variables.

- "let" can be reassigned later.
- "const" can't be reassigned after it's set.

Reach for const by default, and use let only when you actually need to reassign.`}
          timestamp={new Date()}
        />
      </div>
    </div>
  );
}

Dependencies

More by Cameron Kelliher

View all
  • AI Chain of Thought

    AI Chain of Thought

    112
  • Helix Loader

    Helix Loader

    95
  • AI Streaming Text

    AI Streaming Text

    50
  • AI Tool Call

    AI Tool Call

    45
  • Signal Bars Loader

    Signal Bars Loader

    41
  • Glitch Text Loader

    Glitch Text Loader

    41
  • AI Prompt Diff

    AI Prompt Diff

    40
  • AI Conversation Tree

    AI Conversation Tree

    34

More in AI chats

View all
  • AI Actions

    AI Actions

    324
  • Message Thread

    Message Thread

    42
  • Color Picker

    Color Picker

    99
  • Approval Card

    Approval Card

    16
  • Environment Variables

    Environment Variables

    13
  • AI Task List

    AI Task List

    164
  • Agent Chat

    Agent Chat

    18
  • System Message

    System Message

    57