florash

Message Bubble

AI chats

About

A chat message bubble that animates in with a spring entrance and styles user vs. assistant turns differently, for building AI chat and conversation threads.

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

Code

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

Usage.tsx

"use client";

import MessageBubble from "@/components/ui/message-bubble";

export default function MessageBubbleDemo() {
  return (
    <div className="flex w-full max-w-md flex-col gap-3">
      <MessageBubble role="user" index={0}>
        How do I stream a response?
      </MessageBubble>
      <MessageBubble role="assistant" index={1}>
        Reveal it token by token with Streaming Text.
      </MessageBubble>
    </div>
  );
}

Dependencies

More by florash

View all
  • Extruded Button

    Extruded Button

More in AI chats

View all
  • AI Actions

    AI Actions

    352
  • Aquarium Prompt

    Aquarium Prompt

    115
  • Research Report

    Research Report

    7
  • Agent Chat

    Agent Chat

    21
  • Message With Header And Delivery Status

    Message With Header And Delivery Status

    62
  • Tool Web Fetch

    Tool Web Fetch

    4
  • Color Picker

    Color Picker

    204
  • Suggestions

    Suggestions

    40