Message
User bubbles and bubble-less assistant turns.
import { Card } from "@/components/ui/card";
import { ChatgptActions } from "../components/chatgpt-actions";
import { ChatgptMessage } from "../components/chatgpt-message";
export default function ChatgptMessageExample() {
return (
<Card className="border-chatgpt-border bg-chatgpt-bg font-chatgpt text-chatgpt-fg flex w-full min-w-0 flex-col gap-6 rounded-2xl border p-6 text-base ring-0">
<ChatgptMessage from="user">
What are the biggest news stories today?
</ChatgptMessage>
<ChatgptMessage
actions={
<ChatgptActions text="G7 foreign ministers are meeting in Ottawa on a new sanctions package, while the ceasefire talks in Geneva have stalled again." />
}
from="assistant"
>
G7 foreign ministers are meeting in Ottawa on a new sanctions package,
while the ceasefire talks in Geneva have stalled again.
</ChatgptMessage>
</Card>
);
}
$ bunx --bun shadcn@latest add @notra/chatgpt-messageWith from="user" the text sits in ChatGPT’s gray-blue pill, capped at 70% width and aligned to the end. Assistant turns have no bubble. reasoning renders above the reply and actions below it, hidden until you hover or focus the message on devices that can hover.
| Prop | Default | Description |
|---|---|---|
from |
"user" or "assistant". |
|
reasoning |
Assistant only. Usually a ChatgptReasoning. |
|
actions |
Assistant only. Usually ChatgptActions. |
Used in
ChatGPT
A full recreation of a ChatGPT conversation with thinking, web search, reasoning and the model picker.