Skip to content
Cloudflare Docs

RtkChatToggle

A button which toggles visibility of chat. You need to pass the meeting object to it to see the unread messages count badge. When clicked it emits a rtkStateUpdate event with the data:

TypeScript
{ activeSidebar: boolean; sidebar: 'chat' }

Properties

PropertyTypeRequiredDefaultDescription
iconPackIconPackdefaultIconPackIcon pack
meetingMeeting-Meeting object
sizeSize-Size
statesStates-States object
tRtkI18nuseLanguage()Language
variantControlBarVariant-Variant

Usage Examples

Basic Usage

import { RtkChatToggle } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return <RtkChatToggle />;
}

With Properties

import { RtkChatToggle } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return (
<RtkChatToggle
meeting={meeting}
size="md"
variant="button"
/>
);
}