Message Bubble

A React chat message for user, assistant and system roles: user turns sit in a right aligned capsule, assistant replies read as prose, with a streaming cursor.

src/registry/ui/message-bubble.tsx/r/message-bubble.json

Installation#

bash
npx shadcn@latest add @minidev/message-bubble

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/message-bubble.json

Usage#

tsx
import { MessageBubble } from "@/components/ui/message-bubble"

export function Example() {
  return <MessageBubble />
}

API reference#

MessageBubble props
PropTypeDefault
role"user" | "assistant" | "system""assistant"
streamingboolean-
children*React.ReactNode-
classNamestring-

* required

Dependencies#

npm

React only
All AI chat UI components for React

Learn more