React chat UI
Discover a pre-built chat UI for React that supports three different highly customizable layouts. Mix and match layouts to suit your needs.
import Talk from 'talkjs';
import { useCallback } from 'react';
function Chat() {
const syncUser = useCallback(
() =>
new Talk.User({
id: 'nina',
name: 'Nina',
email: 'nina@example.com',
photoUrl: 'https://talkjs.com/new-web/avatar-7.jpg',
welcomeMessage: 'Hi!',
}),
[]
);
return (
<Session appId="tPKdyezd" syncUser={syncUser}>
// UI component will go here...
</Session>
);
}
export default Chat;


The TalkJS Inbox for React shows the chat history on the left, selected conversation on the right. It's designed to act as the messaging center of your app, usually living on its own page.
The React Chatbox is just the right half of the Inbox UI mode. It takes up less space and is designed to be embedded in your app near an order confirmation, a booking, or user profile.
You can also show a conversation in a React popup that only shows up when the user clicks a button somewhere. When shown, the popup is positioned on the bottom right of your page.
You just need to tell us which conversation to display, who's chatting, and where to show it on the page. We take care of the rest! And if you want a deeper integration, we have all the APIs you'll need to add functionality or integrate into your own systems.
import { Session, Chatbox } from "@talkjs/react";
<Session appId="t824ba8" userId="pete">
<Chatbox conversation="workshop" className="chatbox"/>
</Session>You can customize the chat UI with HTML and CSS to exactly meet your needs. With TalkJS Themes you have complete control over the styling, layout, and document structure of the chat messages. You can even show metadata.