Nachricht (Chat) — component.message
Chat-Nachricht: Nutzer als Blase rechts, Assistent als Fließtext links mit Avatar; optionale Anhänge, Aktions-Leiste (Kopieren, Bewerten, Neu erzeugen) und Zeitstempel. 1.1.0: opt-in format=markdown über component.markdown-viewer. 1.8.0: opt-in skeleton = Lade-Platzhalter im Aufbau der Rolle (skelet
Beispiele
Nutzer-Beitrag (Blase rechts) mit Anhang
Assistenten-Antwort mit Aktions-Leiste (erscheint beim Überfahren)
Antwort im Schreiben (Cursor)
System-Hinweis
Antwort mit Denkprozess und Werkzeug davor (Slot before), Aktionen Kopieren + Bewerten (actionSet copy-rate)
Nur Emoji (emojiLarge): groß und ohne Blase
Eigenschaften
| Prop | Typ | Default |
|---|---|---|
avatarFallback | boolean | false |
role | string: user | assistant | system | "assistant" |
skeleton | boolean | false |
skeletonLines | number | 0 |
layout | string: default | chat | "default" |
grouped | boolean | false |
actionsReveal | string: always | hover | "always" |
text * | string | — |
side | string: | start | end | "" |
bubble | boolean | false |
translation | string | "" |
translationShown | boolean | true |
audio | boolean | false |
audioLabel | string | "" |
appear | boolean | false |
format | string: text | markdown | "text" |
author | string | "" |
avatarUrl | string | "" |
avatarName | string | "" |
time | string | "" |
attachments | array | [] |
attachmentTrigger | string | "" |
embeds | array | [] |
replyText | string | "" |
replyAuthor | string | "" |
replyId | number | 0 |
status | string: | sent | read | failed | "" |
actionSet | string: assistant | chat | chat-resend | copy | copy-rate | "assistant" |
actions | boolean | false |
emojiLarge | boolean | false |
streaming | boolean | false |
markdownStream | boolean | false |
padding | string: standard | none | sm | md | lg | xl | "standard" |
margin | string: standard | none | sm | md | lg | xl | "standard" |
border | string: standard | none | hairline | strong | "standard" |
radius | string: standard | none | control | surface | pill | "standard" |
textColor | string | "" |
backgroundColor | string | "" |
shadow | string: standard | none | sm | md | lg | "standard" |
width | string: standard | full | "standard" |
alignSelf | string: standard | start | center | end | "standard" |
anchor | string | "" |
Events & Slots
Events: action, audio
Slot content: akzeptiert component.gap-text, component.*, ui.*, layout.*
Slot default: akzeptiert component.*, ui.*
Slot before: akzeptiert component.*, ui.*
Stellschrauben (Komponenten-Tokens)
| Token | Default |
|---|---|
--message-action-primary | var(--color-action-primary) |
--message-border-default | var(--color-border-default) |
--message-radius-control | var(--shape-control) |
--message-radius-full | var(--shape-pill) |
--message-radius-sm | var(--shape-small) |
--message-radius-surface | var(--shape-card) |
--message-status-info | var(--color-status-info) |
--message-status-success | var(--color-status-success) |
--message-surface-default | var(--color-surface-default) |
--message-surface-sunken | var(--color-surface-sunken) |
--message-text-default | var(--color-text-default) |
--message-text-muted | var(--color-text-muted) |
Genutzte Design-Tokens
border.hairline color.action.primary color.border.default color.status.danger color.status.info color.status.success color.surface.default color.surface.sunken color.text.default color.text.muted container.2xs container.md container.sm container.xs duration.fast duration.slow easing.standard focus.ring-color focus.ring-width font.family.default leading.loose leading.tight radius.full radius.sm size.05 size.1 size.2 size.3 size.32 size.4 size.6 size.8 text.5xl text.md text.sm text.xs weight.semibold