SweetUI

Search items

Jump to an item

component

message

One turn: optional author/timestamp header, bubble content, status line, side alignment.

messagechatconversationrowbubbleshadcn
message, light

On iPad

The same installed source at a regular width. It adapts its layout without a separate design.

message on iPad, light

Install

With the sweetui tool (brew install mangobyte-dev/tap/sweetui):

sweetui install message --destination Sources/YourFeature/Components

Installs in order: avatar 0.2.1, bubble 0.1.1, message 0.1.1. Point --destination at a folder inside the consuming target's sources.

Usage

MessageRow(
    author: Text("Maya"),
    timestamp: Text("09:41"),
    status: Text("Delivered")
) {
    Avatar(initials: "MK", accessibilityLabel: Text("Maya Khalid"))
} content: {
    Text("Are we still on for Thursday?")
}

MessageRow {
    Text("Yes, 6pm works.")
}
.registryVariant(.outgoing)

Accessibility contract

  • Plain text: header+bubble combine; status stays separate.
  • Controls: use .contain not .combine; buttons/links stay separate.
  • Avatar leading on incoming, omitted on outgoing; side conveys direction.
  • Bubble column caps at 320 points; row follows layout direction.
  • Avatar needs caller label; MUST NOT derive one.

Details

Kindcomponent
Version0.1.1
PlatformsiOS 26.0+
Dependenciesavatar, bubble
SourceRegistry/sources/components/MessageRow.swift
Xcode previewMessage Row