Chat

チャットの完全な構成要素。ペイン、スレッド、メッセージ、コンポーザー、送信、サジェスト、入力中インジケーター。添付ファイルは削除できる小さなカードとして入力欄の上に並びます。

対応フレームワーク
  • Angular: 対応
  • Vue: 対応
  • React: 対応
  • React Native: 未対応

使い方

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

インポート

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

API リファレンス

SoneChatAttachmentComponentコンポーネント

`<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.

セレクター
sone-chat-attachment
入力
名前型 デフォルト
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
出力
名前型
remove

The remove button was pressed.

void

SoneChatComposerComponentコンポーネント

セレクター
sone-chat-composer
入力
名前型 デフォルト
layoutChatComposerLayout"inline"
出力
名前型
submittedvoid

SoneChatComposerInputDirectiveディレクティブ

セレクター
textarea[soneChatComposerInput]
出力
名前型
draftInputstring

SoneChatComposerSubmitComponentコンポーネント

セレクター
sone-chat-composer-submit
入力
名前型 デフォルト
pendingbooleanfalse
disabledbooleanfalse

SoneChatComposerToolsDirectiveディレクティブ

セレクター
[soneChatComposerTools]

SoneChatMessageComponentコンポーネント

セレクター
sone-chat-message
入力
名前型 デフォルト
from必須ChatMessageFrom—
variantBubbleVariant | nullnull

SoneChatMessageContentDirectiveディレクティブ

セレクター
[soneChatMessageContent]
入力
名前型 デフォルト
labelstring | undefinedundefined

SoneChatPaneActionsDirectiveディレクティブ

セレクター
[soneChatPaneActions]

SoneChatPaneDescriptionDirectiveディレクティブ

セレクター
[soneChatPaneDescription]

SoneChatPaneDirectiveディレクティブ

セレクター
[soneChatPane]
入力
名前型 デフォルト
barebooleanfalse

SoneChatPaneHeaderDirectiveディレクティブ

セレクター
[soneChatPaneHeader]

SoneChatPaneHeadingDirectiveディレクティブ

セレクター
[soneChatPaneHeading]

SoneChatPaneTitleDirectiveディレクティブ

セレクター
[soneChatPaneTitle]

SoneChatThreadComponentコンポーネント

セレクター
sone-chat-thread
入力
名前型 デフォルト
label—$localize`Conversation`

SoneSuggestionChipsComponentコンポーネント

セレクター
sone-suggestion-chips
入力
名前型 デフォルト
suggestionsreadonly string[][]
disabledbooleanfalse
label—$localize`Suggested questions`
出力
名前型
pickedstring

SoneTypingIndicatorComponentコンポーネント

セレクター
sone-typing-indicator
入力
名前型 デフォルト
label—$localize`Thinking`