https://github.com/botui/.github
https://github.com/botui/.github
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/botui/.github
- Owner: botui
- Created: 2022-10-13T06:18:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-13T06:25:29.000Z (over 3 years ago)
- Last Synced: 2025-03-02T08:29:37.268Z (over 1 year ago)
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

[](https://github.com/botui/botui/discussions) [](https://www.npmjs.com/package/botui) [](https://www.npmjs.com/package/botui) [](https://twitter.com/moinism)
> A JavaScript framework for creating conversational UIs.
[Main Site](https://botui.org) - [Read Docs](https://docs.botui.org) - [Examples](https://github.com/moinism/botui-examples) - [🪄 Quickstart](https://github.com/botui/react-quickstart)
## Showcase 🎇✨
We are listing all the cool projects that people are building with BotUI, [here](https://github.com/botui/botui/blob/master/Showcase.md). See others' and add yours!
### Quick look

## Installation
```bash
npm i botui@next @botui/react
```
### Example usage in React
```js
import { useEffect } from 'react'
import { createRoot } from 'react-dom/client'
import { createBot } from 'botui'
import { BotUI, BotUIMessageList, BotUIAction, useBotUI } from '@botui/react'
const myBot = createBot()
```
```html
```
```js
const App = () => {
useEffect(() => {
myBot
.wait({ waitTime: 1000 })
.then(() => myBot.message.add({ text: 'hello, what is your name?' }))
.then(() => myBot.action.set(
{
options: [
{ label: 'John', value: 'john' },
{ label: 'Jane', value: 'jane' },
],
},
{ actionType: 'select' }
))
.then((data) => myBot.message.add({ text: `nice to meet you ${data.selected.label}` }))
}, [])
return
}
const containerElement = document.getElementById('botui-app')
const root = createRoot(containerElement)
root.render()
```
### License
[MIT License](https://github.com/moinism/botui/blob/master/LICENSE) - Copyrights (c) 2017-22 - Moin Uddin