Purbayan Pramanik

Conversation

AI chats

About

A chat message list that shows user and assistant turns with hover-revealed copy, edit, and regenerate actions.

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

Code

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

Usage.tsx

import {
  Conversation,
  type ConversationMessage,
} from "@/components/ui/conversation";

const messages: ConversationMessage[] = [
  {
    id: "opening-question",
    role: "user",
    content:
      "The layout is working, but the conversation still feels a little assembled. How would you polish it without adding more UI?",
    timestamp: "Wednesday 6:04 PM",
  },
  {
    id: "first-response",
    role: "assistant",
    content:
      "Reduce the distance between related things. The message, its timestamp, and its actions should read as one small unit; everything else should stay out of the way.",
  },
  {
    id: "follow-up-question",
    role: "user",
    content:
      "So the actions should feel attached to the message, not like a separate toolbar?",
    timestamp: "Wednesday 6:08 PM",
  },
  {
    id: "final-response",
    role: "assistant",
    content:
      "Exactly. Keep them quiet until they are useful, then let alignment and spacing do the work. Polish is usually less about adding detail and more about removing the gaps that make an interface hesitate.",
  },
];

export default function ConversationDefaultExample() {
  return (
    <div className="w-full max-w-2xl py-3">
      <Conversation
        messages={messages}
        onEdit={() => undefined}
        onRegenerate={() => undefined}
      />
    </div>
  );
}

Dependencies

More by Purbayan Pramanik

View all
  • Notification Stack

    Notification Stack

    42
  • Proximity Accordion

    Proximity Accordion

    8
  • Plan Checklist

    Plan Checklist

  • Agent Activity

    Agent Activity

  • Snap Panels

    Snap Panels

  • Checkbox Group

    Checkbox Group

More in AI chats

View all
  • AI Actions

    AI Actions

    359
  • Agent Chat

    Agent Chat

    21
  • Aquarium Prompt

    Aquarium Prompt

    140
  • Color Picker

    Color Picker

    221
  • AI Response

    AI Response

    16
  • AI Task List

    AI Task List

    197
  • AI Suggestions

    AI Suggestions

    22
  • Quota Banner

    Quota Banner

    33