React Components for TalkJS
The @talkjs/react-components
library provides React chat UI components for TalkJS.
Prerequisites
To use this package, you will need a TalkJS account. TalkJS provides a ready-to-use chat client for your application. Your account gives you access to TalkJS's free development environment.
Examples
Install @talkjs/react-components
:
npm install @talkjs/react-components
yarn add @talkjs/react-components
Import the Chatbox
component and the related styling into the component where you want to have your chat UI:
import { Chatbox } from "@talkjs/react-components";
import "@talkjs/react-components/default.css";
Then add the Chatbox
component:
<Chatbox
appId="<APP_ID>"
userId="sample_user_alice"
conversationId="sample_conversation"
/>
Replace the <APP_ID>
with your TalkJS app ID, which you can find in the Settings tab of the TalkJS dashboard.
For more details, see our React getting started guide.
Support
If you encounter any problems with @talkjs/react-components
, please open a chat with support. TalkJS support is staffed by engineers.