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:
{ activeSidebar: boolean; sidebar: 'chat' }| Property | Type | Required | Default | Description |
|---|---|---|---|---|
iconPack |
IconPack |
❌ | defaultIconPack |
Icon pack |
meeting |
Meeting |
✅ | - | Meeting object |
size |
Size |
✅ | - | Size |
states |
States |
✅ | - | States object |
t |
RtkI18n |
❌ | useLanguage() |
Language |
variant |
ControlBarVariant |
✅ | - | Variant |
import { RtkChatToggle } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return <RtkChatToggle />;
}import { RtkChatToggle } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return (
<RtkChatToggle
meeting={meeting}
size="md"
variant="button"
/>
);
}