Skip to content

非公式 / UnofficialCloudflare, Inc. 非提携。アカウント情報は入力しないでください。Not affiliated with Cloudflare, Inc. Do not enter Cloudflare credentials here.Official docsこのサイトについてプライバシー

RtkTextComposerView

最終更新 Markdown で表示Agent セットアップ

テキストコンポーザーを描画するコンポーネントです。

プロパティ

プロパティ 型 必須 デフォルト 説明
disabled boolean ✅ - テキスト入力を無効にする(デフォルトは false)
iconPack IconPack1 ❌ defaultIconPack アイコンパック
keyDownHandler (e: KeyboardEvent) ✅ - keydown イベントのハンドラー関数
maxLength number ✅ - テキスト入力の最大長
placeholder string ✅ - プレースホルダーテキスト
rateLimitBreached boolean ✅ - レート制限に達したかどうかを示す真偽値
setText (text: string, focus?: boolean) ❌ - テキスト入力の値を設定する
t RtkI18n1 ❌ useLanguage() 言語
value string ✅ - テキスト入力のデフォルト値

使用例

基本的な使い方

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

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

プロパティを指定する場合

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

function MyComponent() {
  return (
    <RtkTextComposerView
      disabled={true}
      keyDownHandler={(e: keyboardevent)}
      maxLength={42}
    />
  );
}

役に立ちましたか?