For AI agents: Find a documentation index at https://talkjs.com/llms.txt (full content at https://talkjs.com/llms-full.txt). Get a markdown version of any page by appending .md to its URL path.

Installation

Install web components with or without build tooling.

View as Markdown

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.

Install with a package manager

Install the @talkjs/web-components package and the @talkjs/core package:

1npm install @talkjs/web-components @talkjs/core

Import these packages into the component where you have your chat UI:

1import '@talkjs/web-components';
2import '@talkjs/web-components/default.css';

Include as scripts

We suggest installing Components with a package manager, but if this is not possible you can include our libraries as scripts.

You can use one of our pre-built themes, and edit the CSS if you want to make changes to the styling. If you want to customize the behavior of the components, you will need to use a package manager.

Use a pre-built theme

Include the components and default theme's CSS in the <head> tag of the HTML page where you want to add your chat UI:

1<link
2 rel="stylesheet"
3 href="https://cdn.jsdelivr.net/npm/@talkjs/[email protected]/default.css"
4/>
5<script
6 src="https://cdn.jsdelivr.net/npm/@talkjs/[email protected]"
7 async
8></script>