---
url: https://talkjs.com/docs/UI_Components/Web_Components/Installation
---

# Installation

Ask a question Copy for LLM [View as Markdown](/docs/UI_Components/Web_Components/Installation.md)
The recommended way of installing Components is to [install it with a package manager](#install-with-a-package-manager).

If you use JavaScript without a build step and this is not possible, you can [include our libraries](#include-as-scripts) in your HTML `<head>` tag.

## Install with a package manager

Install the [`@talkjs/web-components` package](https://www.npmjs.com/package/@talkjs/web-components) and the [`@talkjs/core` package](https://www.npmjs.com/package/@talkjs/core):

**npm**
```shell
npm install @talkjs/web-components @talkjs/core
```

**yarn**
```shell
yarn add @talkjs/web-components @talkjs/core
```

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

```js
import '@talkjs/web-components';
import '@talkjs/web-components/default.css';
```

## Include as scripts

We suggest [installing Components with a package manager](#install-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:

```html
<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/@talkjs/web-components@0.2.2/default.css"
/>
<script
  src="https://cdn.jsdelivr.net/npm/@talkjs/web-components@0.2.2"
  async
></script>
```