-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
104 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,52 @@ | ||
# botui | ||
A JavaScript library to help you in creating a chat/bot interface | ||
# BotUI | ||
|
||
> A JavaScript framework to create conversational UIs. | ||
|
||
[Main Site](https://botui.org) - [Read Docs](https://docs.botui.org) - [Examples]() | ||
|
||
### Quick look | ||
|
||
```html | ||
<div class="botui-app-container" id="botui-app"> | ||
<bot-ui></bot-ui> | ||
</div> | ||
``` | ||
|
||
```javascript | ||
var botui = new BotUI('botui-app'); // give it the id of container | ||
|
||
botui.message.bot({ // show first message | ||
delay: 200, | ||
content: 'hello' | ||
}).then(function () { | ||
return botui.message.bot({ // second one | ||
delay: 1000, // wait 1 sec. | ||
content: 'how are you?' | ||
}); | ||
}).then(function () { | ||
return botui.action.button({ // let user do something | ||
delay: 1000, | ||
action: [ | ||
{ | ||
text: 'Good', | ||
value: 'good' | ||
}, | ||
{ | ||
text: 'Really Good', | ||
value: 'really_good' | ||
} | ||
] | ||
}); | ||
}).then(function (res) { | ||
return botui.message.bot({ | ||
delay: 1000, | ||
content: 'You are feeling ' + res.text + '!' | ||
}); | ||
}); | ||
``` | ||
|
||
|
||
### License | ||
|
||
MIT License - Copyrights (c) 2017 - Moin Uddin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.