Skip to content

RtkTextMessage

Last updated View as MarkdownAgent setup

@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}
    />
  );
}

Was this helpful?