botui
1.0.0
会話型UIを作成するためのJavaScriptフレームワーク。
メインサイト - ドキュメントを読む - 例 - ?クイックスタート
ここで、人々がボツイで構築しているすべてのクールなプロジェクトをリストしています。他の人を見て、あなたのものを追加してください!
注記
このバージョンは、UIを構築するためにまったく異なるアプローチを使用しています。以前のバージョンのドロップイン交換として使用しないでください。以前の(VUEのみの)アプローチを使用する場合は、 0.3.9バージョン: npm i [email protected]をインストールします。

npm i botui @botui/react import { useEffect } from 'react'
import { createRoot } from 'react-dom/client'
import { createBot } from 'botui'
import { BotUI , BotUIMessageList , BotUIAction } from '@botui/react'
const myBot = createBot ( ) < div id =" botui-app " > </ div > 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 < div >
< BotUI bot = { myBot } >
< BotUIMessageList />
< BotUIAction />
</ BotUI >
</ div >
}
const containerElement = document . getElementById ( 'botui-app' )
const root = createRoot ( containerElement )
root . render ( < App /> )MITライセンス-Copyrights(c)2017-23 -Moin Uddin