Skip to content

Commit

Permalink
Updated README with details on importing using CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
shamilsdq committed Feb 7, 2024
1 parent 283a987 commit 0834032
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

Tarka Chat UI is a plug and play javascript library to integrate a chat assistant to your website in one line

## How to use it
## Importing

Incude the following script in your html

`<script src="https://tarkalabs.github.io/tarka-chat/dist/tarka-chat.umd.js"></script>`
- V1 (Github pages): `<script src="https://tarkalabs.github.io/tarka-chat/dist/tarka-chat.umd.js"></script>`
- V2 (CDN): `<script src="https://d1fmfone96g0x2.cloudfront.net/tarka-chat-2.0.2.umd.js"></script>`

**Note:** More V2 versions are available and can be found from the release tags list. They can be used from the CDN in the format `tarka-chat-<version>.es.js` and `tarka-chat-<version>.umd.js`

## Usage

Initialise the global `TarkaChat` component with options in any script tag

Expand Down Expand Up @@ -44,4 +49,8 @@ where,
- **selectorId** the DOM element selector (id) inside which the bot will be rendered
- **submitHandler** this function will be called whenever a user types a message in the bot and submits

Demo : https://tarkalabs.github.io/tarka-chat/demo/

## Demo

Demo is deployed from the application code in `demo/` folder.
Link: https://tarkalabs.github.io/tarka-chat/demo/

0 comments on commit 0834032

Please sign in to comment.