| プロパティ | 型 | 必須 | デフォルト | 説明 |
|---|---|---|---|---|
actions |
MessageAction[] |
✅ | - | メニューに表示するアクションの一覧 |
authorName |
string |
✅ | - | 投稿者の表示ラベル |
avatarUrl |
string |
✅ | - | アバター画像の URL |
hideAuthorName |
boolean |
✅ | - | 投稿者の表示ラベルを隠します |
hideAvatar |
boolean |
✅ | - | アバターを隠します |
hideMetadata |
boolean |
✅ | - | メタデータ(時刻)を隠します |
iconPack |
IconPack1 |
❌ | defaultIconPack |
アイコンパック |
isEdited |
boolean |
✅ | - | メッセージが編集済みかどうか |
isSelf |
boolean |
✅ | - | 現在のユーザーが送信したメッセージかどうか |
messageType |
Message['type'] |
✅ | - | メッセージの種類 |
pinned |
boolean |
✅ | - | メッセージがピン留めされているかどうか |
time |
Date |
✅ | - | メッセージの送信時刻 |
variant |
'plain' | 'bubble' |
✅ | - | 見た目 |
viewType |
'incoming' | 'outgoing' |
✅ | - | 描画方向 |
import { RtkMessageView } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return <RtkMessageView />;
}import { RtkMessageView } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return (
<RtkMessageView
actions={[]}
authorName="example"
avatarUrl="example"
/>
);
}