Build conversational UIs with React

Installation

npm install --save botui @botui/react

Usage

import { createBot } from "botui"
import { BotUI, BotUIMessageList, BotUIAction } from "@botui/react"
 
const myBot = createBot()
const MyBot = () => {
  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 (
    <div>
      <BotUI bot={myBot}>
        <BotUIMessageList />
        <BotUIAction />
      </BotUI>
    </div>
  )
}

Try it

Useful links

Bot Builder

Want to build bots without coding? Join the waitlist to get early access to the beta.

We're accepting new signups on rolling basis, join now: