Message

Displays a message in a conversation, with optional avatar, header, footer, and alignment.

ME
Deploying to prod real quick.
R
It's 4:55 PM. On a Friday.
ME
It's a one-line change.
R
It's always a one-line change 😭.
Alright, let me take a look.
👍
Spartan is typing...

Installation

ng g @spartan-ng/cli:ui message

Usage

import { HlmAvatarImports } from '@spartan-ng/helm/avatar';
import { HlmBubbleImports } from '@spartan-ng/helm/bubble';
import { HlmMarkerImports } from '@spartan-ng/helm/marker';
import { HlmMessageImports } from '@spartan-ng/helm/message';
<div hlmMessage>
  <div hlmMessageAvatar>
    <hlm-avatar>
      <img hlmAvatarImage src="/assets/avatar.png" alt="@spartan" />
      <span hlmAvatarFallback>SP</span>
    </hlm-avatar>
  </div>
  <div hlmMessageContent>
    <div hlmBubble>
      <div hlmBubbleContent>How can I help you today?</div>
    </div>
  </div>
</div>

Message owns the row layout — avatar, alignment, header, and footer. Render the visible message surface with Bubble .

Examples

Avatar

Use hlmMessageAvatar to render an avatar next to the message. Set align="end" to flip the row.

R
The build failed during dependency installation.
ME
Can you share the exact error?
R
Here's the error from the logs
Something went wrong with the build. The libraries are not installed correctly. Try running the build again.

Group

Use hlmMessageGroup to stack consecutive messages from the same sender. Render an empty avatar slot on earlier messages to keep alignment.

I checked the registry addresses.
CN
The component and example JSON now live under the UI registry.

Use hlmMessageHeader for a sender name and hlmMessageFooter for metadata such as delivery status.

Olivia
I already checked the logs.
Send the report to the team. Ping @spartan if you need help.

Actions

Place message-level actions in hlmMessageFooter , such as copy, retry, or feedback buttons.

The install failure is coming from the workspace package.
Okay drop me a link. Taking a look...

Attachment

Compose Attachment inside hlmMessageContent alongside bubbles.

Workspace
Here's the image. Can you add it to the PDF? Use it for the cover page.
Done. Here's the PDF with the image added as the cover page.
sales-dashboard.pdfPDF · 2.4 MB
Thanks. Looks good.

RTL

To enable RTL support in spartan-ng, see the RTL configuration guide.

ME
إنه تغيير بسطر واحد.
SP
حسنًا، دعني ألقي نظرة.
سبارتان يكتب...

Helm API

HlmMessageAvatar

Selector: [hlmMessageAvatar],hlm-message-avatar

HlmMessageContent

Selector: [hlmMessageContent],hlm-message-content

HlmMessageFooter

Selector: [hlmMessageFooter],hlm-message-footer

HlmMessageGroup

Selector: [hlmMessageGroup],hlm-message-group

HlmMessageHeader

Selector: [hlmMessageHeader],hlm-message-header

HlmMessage

Selector: [hlmMessage],hlm-message

Inputs

PropTypeDefaultDescription
align MessageAlign 'start' -
Native Select Menubar