Message

A message with its sender, avatar and footer, holding one or more bubbles.

@cupertinoui/messageRegistry JSON

Installation

pnpm dlx shadcn@latest add @cupertinoui/message

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

import { Message, MessageAvatar, MessageContent, MessageHeader } from "@/components/ui/message"

<Message>
  <MessageAvatar>…</MessageAvatar>
  <MessageContent>
    <MessageHeader>Mia Appleseed</MessageHeader>
    {/* Bubbles */}
  </MessageContent>
</Message>

API Reference

Every part forwards the props of the underlying element. The props below are the ones CupertinoUI adds or changes.

Message

PropTypeDescription
align"start" | "end"
Default: "start"
Received on the left, sent on the right.
classNamestringExtra classes, merged with the component's own.

MessageGroup / MessageAvatar / MessageContent / MessageHeader / MessageFooter

PropTypeDescription
classNamestringExtra classes, merged with the component's own.