Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/botsquad/web-client
Botsquad's chat component for ReactJS
https://github.com/botsquad/web-client
chatbot reactjs reactjs-components
Last synced: 24 days ago
JSON representation
Botsquad's chat component for ReactJS
- Host: GitHub
- URL: https://github.com/botsquad/web-client
- Owner: botsquad
- License: mit
- Created: 2020-03-04T08:55:11.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-22T07:57:07.000Z (11 months ago)
- Last Synced: 2024-10-18T09:03:47.031Z (3 months ago)
- Topics: chatbot, reactjs, reactjs-components
- Language: TypeScript
- Homepage: https://web-client-demo.bsqd.me/
- Size: 2.24 MB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BotSquad Web Client React component
[![CI check/test/build](https://github.com/botsquad/web-client/actions/workflows/webpack.yml/badge.svg)](https://github.com/botsquad/web-client/actions/workflows/webpack.yml)
[![npm (scoped)](https://img.shields.io/npm/v/@botsquad/web-client)](https://www.npmjs.com/package/@botsquad/web-client)The BotSquad Web Client components embeds Botsquad chatbots inside a
React component for the web.## Demo
A Botsquad chatbot has a lot of UI controls, like input widgets and chat bubble types. To try them all out, visit the
[Web Client demonstration page](https://web-client-demo.bsqd.me/).## Installation
npm install @botsquad/web-client
## Development
1. Install dependencies with `npm install`
1. Create a .devenv in the root folder and add the contents of template.devenv and replace the variables with the keys you have.
1. Run in development with `npm run dev`## Example code
```javascript
import React from 'react'
import WebClient from '@botsquad/web-client'// A user ID, based on a cookie or some external property
const user_id = 'u' + Math.random()// your Botsquad bot
const bot_id = '1adc3f20-32e9-4376-a147-d9ef23ac8a4c'function App() {
return (
)
}export default App
```