A JavaScript framework to build UI for your bot.
BotUI makes it super easy to create conversational/bot interfaces. It has an intuitive JavaScript API to add messages and show actions that a user can perform.
It also gives you total control over how everything looks. You can also create your own themes.
Here's a quick preview of how it works.
Add the <bot-ui>
where you want the bot to appear.
...
<div id="my-botui-app">
<bot-ui></botui>
</div>
...
Pass the parent element's id
to BotUI
constructor.
var botui = new BotUI('my-botui-app');
Call the message.add
method to show a message.
botui.message.add({
content: 'Hello There!'
}).then(function () { // wait till its shown
botui.message.add({ // show next message
content: 'How are you?'
});
});
Follow the docs for details about how everything works.