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
|
|
|
```
|