RtkChatMessage
{/* AUTO-GENERATED FILE. DO NOT EDIT MANUALLY. Any manual changes will be overwritten the next time the docs are generated.
Source: https://github.com/cloudflare/realtimekit-ui/blob/main/packages/core/src/components/rtk-chat-message/rtk-chat-message.tsx Generator: https://github.com/cloudflare/realtimekit-ui/blob/main/scripts/generate-stencil-docs.js
To update this page, edit the component source in the realtimekit-ui repository and submit a pull request against the staging branch; the changes will automatically sync here upon the next release. */}
@deprecated rtk-chat-message is deprecated and will be removed soon. Use rtk-message-view instead.
Properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
alignRight |
boolean |
✅ | - | aligns message to right |
canDelete |
boolean |
✅ | - | can delete message |
canEdit |
boolean |
✅ | - | can edit message |
canPin |
boolean |
✅ | - | can pin this message |
canReply |
boolean |
✅ | - | can quote reply this message |
child |
HTMLElement |
✅ | - | Child |
disableControls |
boolean |
✅ | - | disables controls |
hideAvatar |
boolean |
✅ | - | hides avatar |
iconPack |
IconPack1 |
❌ | defaultIconPack |
Icon pack |
isContinued |
boolean |
✅ | - | is continued |
isSelf |
boolean |
✅ | - | if sender is self |
isUnread |
boolean |
✅ | - | is unread |
leftAlign |
boolean |
✅ | - | Whether to left align the chat bubbles |
message |
Message |
✅ | - | message item |
senderDisplayPicture |
string |
✅ | - | sender display picture url |
size |
Size |
✅ | - | Size |
t |
RtkI18n1 |
❌ | useLanguage() |
Language |
Usage Examples
Basic Usage
import { RtkChatMessage } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return <RtkChatMessage />;
}
With Properties
import { RtkChatMessage } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return (
<RtkChatMessage
alignRight={true}
canDelete={true}
canEdit={true}
/>
);
}
这篇文档对你有帮助吗?
谢谢你的反馈!