RtkTextMessage


目录

{/* 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-text-message/rtk-text-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-text-message is deprecated and will be removed soon. Use rtk-text-message-view instead. A component which renders a text message from chat.

Properties

Property Type Required Default Description
iconPack IconPack ❌ defaultIconPack Icon pack
isContinued boolean ✅ - Whether the message is continued by same user
message TextMessage ✅ - Text message object
now Date ✅ - Date object of now, to calculate distance between dates
showBubble boolean ✅ - show message in bubble
t RtkI18n ❌ useLanguage() Language

Usage Examples

Basic Usage

import { RtkTextMessage } from '@cloudflare/realtimekit-react-ui';

function MyComponent() {
  return <RtkTextMessage />;
}

With Properties

import { RtkTextMessage } from '@cloudflare/realtimekit-react-ui';

function MyComponent() {
  return (
    <RtkTextMessage
      isContinued={true}
      message={textmessage}
      now={date}
    />
  );
}

版本号 #2
由 壳壳虫 创建于 2026-11-01 03:42:07 UTC
由 壳壳虫 更新于 2026-11-01 03:42:09 UTC