2023-02-21 16:22:25 +01:00
> ⚠️ This library is deprecated in favor of [`@typebot.io/js`](https://www.npmjs.com/package/@typebot.io/js) and [`@typebot.io/react`](https://www.npmjs.com/package/@typebot.io/react)
2022-03-10 17:47:59 +01:00
# Typebot JS library
Frontend library to embed typebots from [Typebot ](https://www.typebot.io/ ).
## Installation
To install, simply run:
```bash
npm install typebot-js
```
## Usage
It exposes 3 functions:
```ts
2022-03-13 08:56:10 +01:00
initContainer()
initPopup()
initBubble()
2022-03-10 17:47:59 +01:00
```
You can configure them directly in the "Share" tab of your typebot.
Example:
```ts
2022-03-13 08:56:10 +01:00
import { initContainer } from 'typebot-js'
2022-03-10 17:47:59 +01:00
2022-03-13 08:56:10 +01:00
const plausible = initContainer('container-id', {
publishId: 'my-app.com',
})
2022-03-10 17:47:59 +01:00
```