Installation
The recommended way of installing Components is to install it with a package manager.
If you use JavaScript without a build step and this is not possible, you can include our libraries in your HTML <head>
tag.
If you're using React, install the @talkjs/react-components
package, along with react
and react-dom
:
1npm install @talkjs/react-components react react-dom
If you're using another framework, install the @talkjs/web-components
package instead:
1npm install @talkjs/web-components
Import these packages into the component where you have your chat UI:
1import { Chatbox } from '@talkjs/react-components';2import '@talkjs/react-components/default.css';
We suggest installing Components with a package manager, but if this is not possible you can include our libraries as scripts.
Include the components script and the default theme CSS the <head>
tag of the HTML page where you want to add your chat UI:
1<link2 rel="stylesheet"4/>5<script7 async8></script>