botui-react

1.0.1 • Public • Published

BotUI-React

React wrapper for BotUI API

Getting Started

Installing

You can download the package from npm using npm or yarn

npm i botui-react

Or

yarn add botui-react

Usage

Link Vue.js and the BotUI script in your HTML file.

<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.0.5/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/botui/build/botui.js"></script>

Import the component into your project.

import Botui from 'botui-react';

Instantiate it in your jsx.

<Botui ref={ cmp => this.botui = cmp } />

Create a conversation.

componentDidMount() {
    this.botui.message.bot({
        content: "Hello World",
        delay: 1000
    });
    this.botui.action.text({
        action: {
            placeholder: "Enter your text here"
        }
    });
}

For more examples, you can refer to the BotUI documentation.

License

This project is licensed under the MIT License

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i botui-react

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

8.52 kB

Total Files

3

Last publish

Collaborators

  • gabriel_colson