チャットコンポーザーを描画するコンポーネントです。
| プロパティ | 型 | 必須 | デフォルト | 説明 |
|---|---|---|---|---|
canSendFiles |
boolean |
✅ | - | ユーザーがファイルメッセージを送信できるかどうか |
canSendTextMessage |
boolean |
✅ | - | ユーザーがテキストメッセージを送信できるかどうか |
iconPack |
IconPack1 |
❌ | defaultIconPack |
アイコンパック |
inputTextPlaceholder |
string |
✅ | - | テキスト入力のプレースホルダー |
isEditing |
boolean |
✅ | - | コンポーザーを編集モードにします |
maxLength |
number |
✅ | - | テキスト入力の最大長 |
message |
string |
✅ | - | 事前入力するメッセージ |
quotedMessage |
string |
✅ | - | 表示する引用メッセージ |
rateLimits |
{ period: number; maxInvocations: number; } |
✅ | - | レート制限 |
storageKey |
string |
✅ | - | localStorage にメッセージを保存するキー |
t |
RtkI18n1 |
❌ | useLanguage() |
言語 |
import { RtkChatComposerView } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return <RtkChatComposerView />;
}import { RtkChatComposerView } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return (
<RtkChatComposerView
canSendFiles={true}
canSendTextMessage={true}
inputTextPlaceholder="example"
/>
);
}