Message Bubble
manifest-ui/message-bubbleFreeBlock
Chat message bubbles with text, image, voice, and reaction variants.
Install it
npx shadcn@latest add https://ui.manifest.build/r/message-bubble.jsonSource
1'use client'23import {4 DropdownMenu,5 DropdownMenuContent,6 DropdownMenuTrigger7} from '@/components/ui/dropdown-menu'8import { cn } from '@/lib/utils'9import { demoTextMessages, demoImageMessages, demoReactionMessage, demoVoiceMessage } from './demo/messaging'10import { Check, CheckCheck, Smile } from 'lucide-react'11import { useRef, useState } from 'react'1213/**14 * Internal avatar component options.15 * @interface InternalAvatarOptions16 * @property {string} [src] - Avatar image URL17 * @property {string} fallback - Fallback letter when image fails or is missing18 * @property {string} [className] - Additional CSS classes19 */20interface InternalAvatarOptions {21 src?: string22 fallback: string23 className?: string24}2526function Avatar({ src, fallback, className }: InternalAvatarOptions) {27 const [imgError, setImgError] = useState(false)2829 if (src && !imgError) {30 return (31 <img32 src={src}33 alt={fallback}34 onError={() => setImgError(true)}35 className={cn('h-8 w-8 rounded-full object-cover shrink-0', className)}36 />37 )38 }3940 return (41 <div42 className={cn(43 'h-8 w-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center text-xs font-semibold shrink-0',44 className45 )}46 >47 {fallback}48 </div>49 )50}5152/**53 * ═══════════════════════════════════════════════════════════════════════════54 * MessageBubbleProps55 * ═══════════════════════════════════════════════════════════════════════════56 *57 * Props for configuring a text message bubble in chat interfaces with avatar,58 * delivery status, and own/other message styling.59 */60export interface MessageBubbleProps {61 data?: {62 /** Message text content to display. */63 content?: string64 /** URL for the sender's avatar image. */65 avatarUrl?: string66 /** Fallback letter to display when avatar image is unavailable. */67 avatarFallback?: string68 /** Display name of the message author. */69 author?: string70 /** Time display string (e.g., "10:30 AM"). */71 time?: string72 }73 appearance?: {74 /**75 * Whether this message is from the current user.76 * @default false77 */78 isOwn?: boolean79 }80// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from Manifest UI
All 32 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Amount Inputamount-input | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Chat Conversationchat-conversation | Manifest UI | Blocks | Free | 1 dep · 3 files | |
| Contact Formcontact-form | Manifest UI | Blocks | Free | 1 dep · 3 files | |
| Date & Time Pickerdate-time-picker | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Cardevent-card | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Confirmationevent-confirmation | Manifest UI | Blocks | Free | 1 dep · 2 files | |
| Event Detailevent-detail | Manifest UI | Blocks | Free | 3 deps · 2 files | |
| Event Listevent-list | Manifest UI | Blocks | Free | 3 deps · 2 files |
