botui
1.0.0
Un marco de JavaScript para crear UI conversacionales.
Sitio principal - Leer Docios - Ejemplos -? Inicio rápido
Estamos enumerando todos los proyectos geniales que la gente está construyendo con Botui, aquí. ¡Vea los demás y agregue el suyo!
Nota
Esta versión está utilizando un enfoque completamente diferente para construir UI. No lo use como un reemplazo de entrega de la versión anterior. Si desea utilizar el enfoque anterior (solo Vue), instale la versión 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 /> )Licencia MIT - Copyrights (C) 2017-23 - Moin Uddin