Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@creadi/tchatche-react

creadi13GPL-2.01.0.5TypeScript support: included

Simple chat bot. Supports button and text input responses.

chat bot

readme

tchatche-react

A react port of the tchatche conversational bot UI.

Install

# npm
npm install @creadi/tchatche-react

# yarn
yarn add @creadi/tchatche-react

Usage

import React from 'react'
import Tchatche from '@creadi/tchatche-react'
import { BotMessage } from '@creadi/tchatche-react/dist/types'

const messages: BotMessage[] = [
  // ...
]

const onEnd = (({ conversation, data }) => {
  // ...
})

export default <Tchatche messages={messages} onEnd={onEnd} pace={300} />

Find a more thorough explanation of the structure of BotMessage here

Release new version

  • A release on github will automatically trigger npm publishing. Make sure versions are in sync.