Messaging

1 variant

Chat app blocks with a conversation list, grouped bubbles, read receipts, typing, reactions, and an emoji composer.

Messaging app

Send a message and watch it rise from the composer, step from sending to delivered, then get marked seen as their portrait pops in under it. They type back, the reply lands, and the chat springs to the top of the list. Double-click a bubble to like it, react from the emoji picker, and switch chats as unread badges clear.

Maya Chen

Online

Today

  1. Did you make it up to the ridge?

    Seen
  2. Just before sunrise. Worth every step.

  3. Mountain peaks above a sea of clouds at sunrise
  4. Saving you a spot for next weekend?

"use client";

import { Messenger } from "@/components/premium/messenger";

export function MessengerPreview() {
  return <Messenger />;
}

Install

$ bunx --bun shadcn add @beui-pro/messenger

API Reference

Every prop is optional unless marked required. Data, copy, and colors default to the sample content.

Messenger9 props
  • conversations

    Starting chats, read once on mount. Defaults to the sample chats.

    Conversation[]
  • me

    The viewer; messages from this id show as outgoing.

    MessengerPerson
  • labels

    Text overrides merged over the default labels.

    Partial<MessengerLabels>
  • live

    Play scripted receipts and replies. Turn off when wiring a real backend.

    boolean

    Default true

  • onSend

    Called with the chat id and trimmed text when the user sends a message.

    ((conversationId: string, text: string) => void)
  • onCall

    Called with the open chat id when the call button is pressed.

    ((conversationId: string) => void)
  • onVideo

    Called with the open chat id when the video button is pressed.

    ((conversationId: string) => void)
  • onAttach

    Called with the open chat id when the attach button is pressed.

    ((conversationId: string) => void)
  • className

    Classes merged onto the root element.

    string
Types4 types

The object types these props take, field by field.

MessengerPerson4 fields
  • idRequired

    Unique id, matched against each message's sender.

    string
  • nameRequired

    Display name in the chat list and thread header.

    string
  • avatarRequired

    Portrait image URL.

    string
  • online

    Shows a green dot and the online label when true.

    boolean
Conversation5 fields
  • idRequired

    Unique chat id.

    string
  • personRequired

    The other person in the chat.

    MessengerPerson
  • messagesRequired

    Messages in order, oldest first.

    Message[]
  • unread

    Unread count shown as a badge; the first chat starts at 0.

    number
  • replies

    Scripted replies played back, one per message the viewer sends.

    string[]
MessengerLabels20 fields
  • titleRequired

    Chat list heading and the section's accessible name.

    string
  • searchRequired

    Search field placeholder and accessible name.

    string
  • onlineRequired

    Thread header status when the person is online.

    string
  • offlineRequired

    Thread header status when the person is offline.

    string
  • typingRequired

    Text shown while the other person is typing.

    string
  • youRequired

    Prefix on the chat preview when you sent the last message.

    string
  • placeholderRequired

    Composer placeholder and accessible name.

    string
  • sendRequired

    Accessible name for the send button.

    string
  • emojiRequired

    Accessible name for the emoji button.

    string
  • attachRequired

    Accessible name for the attach button.

    string
  • callRequired

    Accessible name for the call button.

    string
  • videoRequired

    Accessible name for the video call button.

    string
  • backRequired

    Accessible name for the back button on narrow layouts.

    string
  • sendingRequired

    Receipt text while a message is sending.

    string
  • sentRequired

    Receipt text once a message is sent.

    string
  • deliveredRequired

    Receipt text once a message is delivered.

    string
  • seenRequired

    Tooltip and screen reader text for the seen portrait.

    string
  • todayRequired

    Day divider text above the messages.

    string
  • unreadRequired

    Builds the unread part of a chat row's accessible name.

    (count: number) => string
  • likeHintRequired

    Hint about double-click to like; not shown anywhere yet.

    string
Message7 fields
  • idRequired

    Unique message id.

    string
  • fromRequired

    Sender id; the viewer's id marks outgoing messages.

    string
  • text

    Message body text.

    string
  • image

    Photo shown in the bubble, with its alt text.

    { src: string; alt: string }
  • timeRequired

    Caller-formatted time, such as "9:41 AM".

    string
  • reactions

    Emoji reactions shown under the bubble.

    Reaction[]
  • status

    Delivery state of outgoing messages.

    MessageStatus