Chat

Die vollständige Chat-Anatomie: Bereich, Thread, Nachrichten, Eingabefeld, Senden, Vorschläge und Tippindikator. Anhänge liegen als kleine, entfernbare Karten über dem Feld.

Verfügbar für
  • Angular: verfügbar
  • Vue: verfügbar
  • React: verfügbar
  • React Native: noch nicht verfügbar

Verwendung

Ask about this meeting

Answers use the planning meeting transcript
What did Ada and Leo decide about the onboarding checklist?
They agreed to cut the checklist from twelve steps to five and to ship the shorter version behind a feature flag first. Leo owns the rollout.
Planning meetingmeetings.example.com/planning

Import

ts
import {
  SoneChatAttachmentComponent,
  SoneChatComposerComponent,
  SoneChatComposerInputDirective,
  SoneChatComposerSubmitComponent,
  SoneChatComposerToolsDirective,
  SoneChatMessageComponent,
  SoneChatMessageContentDirective,
  SoneChatPaneActionsDirective,
  SoneChatPaneDescriptionDirective,
  SoneChatPaneDirective,
  SoneChatPaneHeaderDirective,
  SoneChatPaneHeadingDirective,
  SoneChatPaneTitleDirective,
  SoneChatThreadComponent,
  SoneSuggestionChipsComponent,
  SoneTypingIndicatorComponent,
} from "@surface-one/angular/chat";

API-Referenz

SoneChatAttachmentComponentKomponente

`<sone-chat-attachment>` — a linked or uploaded item in the composer: a grey card with a mark (the projected content: a favicon, a file icon, a `<sone-mark>`), the `title` and its `url` (or a size), and — when `removable` — a small round remove button (“Remove {title}”) that emits `remove`. Put it inside `<sone-chat-composer>`, which lines attachments up above the field.

Selektor
sone-chat-attachment
Inputs
NameTyp Standard
title

What it is: a page title, a file name.

string""
url

Where it is (or its size), under the title.

string | nullnull
removable

Shows the remove button.

booleanfalse
Outputs
NameTyp
remove

The remove button was pressed.

void

SoneChatComposerComponentKomponente

Selektor
sone-chat-composer
Inputs
NameTyp Standard
layoutChatComposerLayout"inline"
Outputs
NameTyp
submittedvoid

SoneChatComposerInputDirectiveDirektive

Selektor
textarea[soneChatComposerInput]
Outputs
NameTyp
draftInputstring

SoneChatComposerSubmitComponentKomponente

Selektor
sone-chat-composer-submit
Inputs
NameTyp Standard
pendingbooleanfalse
disabledbooleanfalse

SoneChatComposerToolsDirectiveDirektive

Selektor
[soneChatComposerTools]

SoneChatMessageComponentKomponente

Selektor
sone-chat-message
Inputs
NameTyp Standard
fromerforderlichChatMessageFrom—
variantBubbleVariant | nullnull

SoneChatMessageContentDirectiveDirektive

Selektor
[soneChatMessageContent]
Inputs
NameTyp Standard
labelstring | undefinedundefined

SoneChatPaneActionsDirectiveDirektive

Selektor
[soneChatPaneActions]

SoneChatPaneDescriptionDirectiveDirektive

Selektor
[soneChatPaneDescription]

SoneChatPaneDirectiveDirektive

Selektor
[soneChatPane]
Inputs
NameTyp Standard
barebooleanfalse

SoneChatPaneHeaderDirectiveDirektive

Selektor
[soneChatPaneHeader]

SoneChatPaneHeadingDirectiveDirektive

Selektor
[soneChatPaneHeading]

SoneChatPaneTitleDirectiveDirektive

Selektor
[soneChatPaneTitle]

SoneChatThreadComponentKomponente

Selektor
sone-chat-thread
Inputs
NameTyp Standard
label—$localize`Conversation`

SoneSuggestionChipsComponentKomponente

Selektor
sone-suggestion-chips
Inputs
NameTyp Standard
suggestionsreadonly string[][]
disabledbooleanfalse
label—$localize`Suggested questions`
Outputs
NameTyp
pickedstring

SoneTypingIndicatorComponentKomponente

Selektor
sone-typing-indicator
Inputs
NameTyp Standard
label—$localize`Thinking`