Skip to main content
GitHub

Source

Pictographic representation of the component.

Chat

The Chat component provides ready-to-use chat functionality in a LiveKit room. Messages are distributed to all participants in the room in real-time.

Import

import { Chat } from "@livekit/components-react";

Remarks

  • Only users who are in the room at the time of dispatch will receive messages - Message history is not persisted between sessions - Requires @livekit/components-styles to be imported for styling

Usage

import "@livekit/components-styles";
function Room() {
return (
<LiveKitRoom data-lk-theme="default">
<Chat />
</LiveKitRoom>
);
}

For custom styling, refer to: https://docs.livekit.io/reference/components/react/concepts/style-components/

Properties

messageFormatterMessageFormatterOptional

(Optional)