All Projects → LucasBassetti → React Native Chatbot

LucasBassetti / React Native Chatbot

Licence: mit
💬 Easy way to create conversation chats

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Native Chatbot

React Simple Chatbot
💬 Easy way to create conversation chats
Stars: ✭ 1,292 (+509.43%)
Mutual labels:  chatbot, chat, conversational-ui
Botframework Webchat
A highly-customizable web-based client for Azure Bot Services.
Stars: ✭ 1,198 (+465.09%)
Mutual labels:  chatbot, chat, conversational-ui
Conversational Ui
Conversational interface web app example
Stars: ✭ 78 (-63.21%)
Mutual labels:  chatbot, chat, conversational-ui
Dialogflow Web V2
Dialogflow Web Integration. Rich Components, Actions on Google and more
Stars: ✭ 307 (+44.81%)
Mutual labels:  chatbot, chat, conversational-ui
Chaskiq
A full featured Live Chat, Support & Marketing platform, alternative to Intercom, Drift, Crisp, etc ...
Stars: ✭ 1,263 (+495.75%)
Mutual labels:  chatbot, chat
Omeglemiddleman
Lets you connect strangers to each other, and intercept messages AKA Man in the Middle Attack
Stars: ✭ 85 (-59.91%)
Mutual labels:  chatbot, chat
Seq2seq chatbot
a chatbot which is implemented via seq2seq model.
Stars: ✭ 90 (-57.55%)
Mutual labels:  chatbot, chat
Applozic Ios Sdk
iOS Real Time Chat & Messaging SDK
Stars: ✭ 104 (-50.94%)
Mutual labels:  chatbot, chat
Webbybot
chatterbot written in es6 (es2015), fork from hubot
Stars: ✭ 71 (-66.51%)
Mutual labels:  chatbot, chat
Botpress
🤖 Dev tools to reliably understand text and automate conversations. Built-in NLU. Connect & deploy on any messaging channel (Slack, MS Teams, website, Telegram, etc).
Stars: ✭ 9,486 (+4374.53%)
Mutual labels:  chatbot, conversational-ui
Venom
Venom is the most complete javascript library for Whatsapp, 100% Open Source.
Stars: ✭ 3,457 (+1530.66%)
Mutual labels:  chatbot, chat
Convform
A jQuery plugin that transforms a form into an interactive chat.
Stars: ✭ 141 (-33.49%)
Mutual labels:  chatbot, chat
Lookerbot
Lookerbot lets you access all your Looker data from Slack! Super fun!
Stars: ✭ 138 (-34.91%)
Mutual labels:  chatbot, chat
Mojo Webqq
【重要通知:WebQQ将在2019年1月1日停止服务,此项目目前已停止维护,感谢大家四年来的一路陪伴】使用Perl语言(不会没关系)编写的smartqq/webqq客户端框架(非GUI),可通过插件提供基于HTTP协议的api接口供其他语言或系统调用
Stars: ✭ 1,755 (+727.83%)
Mutual labels:  chatbot, chat
Mojo Weixin
使用Perl语言(不会没关系)编写的个人账号微信/weixin/wechat客户端框架(非GUI),可通过插件提供基于HTTP协议的api接口供其他语言或系统调用
Stars: ✭ 1,181 (+457.08%)
Mutual labels:  chatbot, chat
Addchat Laravel
AddChat Laravel is a Laravel chat package. Live chat widget for Laravel that also includes multi-user chat, group permissions, customer support chat & more.
Stars: ✭ 99 (-53.3%)
Mutual labels:  chatbot, chat
Chatskills
Run and debug Alexa skills on the command-line. Create bots. Run them in Slack. Run them anywhere!
Stars: ✭ 171 (-19.34%)
Mutual labels:  chatbot, conversational-ui
Tiledesk Dashboard
The Tiledesk dashboard. Tiledesk is an Open Source Live Chat platform written in NodeJs, firebase and Angular.
Stars: ✭ 53 (-75%)
Mutual labels:  chatbot, chat
Everydaywechat
微信助手:1.每日定时给好友(女友)发送定制消息。2.机器人自动回复好友。3.群助手功能(例如:查询垃圾分类、天气、日历、电影实时票房、快递物流、PM2.5等)
Stars: ✭ 8,688 (+3998.11%)
Mutual labels:  chatbot, chat
Botkit
Botkit is an open source developer tool for building chat bots, apps and custom integrations for major messaging platforms.
Stars: ✭ 10,555 (+4878.77%)
Mutual labels:  chatbot, conversational-ui

React Native Chatbot

npm version

A react native chatbot component to create conversation chats. Based on react-simple-chatbot.

Getting Start

npm install react-native-chatbot --save

Usage

import ChatBot from 'react-native-chatbot';

const steps = [
  {
    id: '0',
    message: 'Welcome to react chatbot!',
    trigger: '1',
  },
  {
    id: '1',
    message: 'Bye!',
    end: true,
  },
];

<ChatBot steps={steps} />

Documentation

Properties

Name Type Default Description
avatarStyle PropTypes.object The style object to use to override the avatar element
avatarWrapperStyle PropTypes.object The style object to use to override the avatar surrounding element
botAvatar PropTypes.string img Bot image source
botBubbleColor PropTypes.string #6E48AA Bot bubble color
botDelay PropTypes.number 1000 The delay time of bot messages
botFontColor PropTypes.string #fff Bot font color
bubbleStyle PropTypes.object The style object to use to override the bubble element
optionStyle PropTypes.object The style object to use to override the option container
optionElementStyle PropTypes.object The style object to use to override the option element
optionFontColor PropTypes.string Option font color
optionBubbleColor PropTypes.string Option bubble color
className PropTypes.string Add a class name to root element
contentStyle PropTypes.object The style object to use to override the scroll element
customDelay PropTypes.number 1000 The delay time of custom messages
customStyle PropTypes.object The style object to use to override the custom step element
footerStyle PropTypes.object The style object to use to override the footer element
handleEnd({ renderedSteps, steps, values }) PropTypes.func The callback function when chat ends
headerComponent PropTypes.element Header component for the chatbot
hideUserAvatar PropTypes.bool false If true the user avatar will be hidden in all steps
inputStyle PropTypes.object The style object to use to override the input element
keyboardVerticalOffset PropTypes.number ios ? 44 : 0 Vertical offset of keyboard view. Check keyboardVerticalOffset
placeholder PropTypes.string Type the message ... Chatbot input placeholder
steps PropTypes.array The chatbot steps to display
style PropTypes.object The style object to use to override the submit button element
submitButtonStyle PropTypes.object The style object to use to override the button element
submitButtonContent PropTypes.string or PropTypes.element SEND The string or object to use to override the button content
userAvatar PropTypes.string img User image source
userBubbleStyle PropTypes.string img The style object to use to override the user's bubble element
userBubbleColor PropTypes.string #fff User bubble color
userDelay PropTypes.number 1000 The delay time of user messages
userFontColor PropTypes.string #4a4a4a User font color
scrollViewProps PropTypes.object #4a4a4a Use to override scroll view props

Steps

Text Step

Name Type Required Description
id String / Number true The step id. Required for any step
message String / Function true The text message. If function, it will receive ({ previousValue, steps }) params
trigger String / Number / Function false The id of next step to be triggered. If function, it will receive ({ value, steps }) params
avatar String false the avatar to be showed just in this step. Note: this step must be a step that avatar appears
delay Number false set the delay time to message be shown
end Boolean false if true indicate that this step is the last
inputAttributes Object Set any attributes on the input field (keyboardType, autoCapitalize, autoComplete)
metadata Object Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format

Example:

{
  id: '1',
  message: 'Hello World',
  trigger: '2',
},
{
  id: '2',
  message: ({ previousValue, steps }) => 'Hello',
  end: true,
}

User Step

Name Type Required Description
id String / Number true The step id. Required for any step
user Boolean true if true indicate that you waiting a user type action
trigger String / Number / Function false The id of next step to be triggered. If function, it will receive ({ value, steps }) params
validator String / Number false if user attribute is true you can pass a validator function to validate the text typed by the user
end Boolean false if true indicate that this step is the last
inputAttributes Object Set any attributes on the input field (keyboardType, autoCapitalize, autoComplete)
metadata Object Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format

Example:

{
  id: '1',
  user: true,
  inputAttributes: {
    keyboardType: 'email-address'
  },
  end: true,
}

Options Step

Name Type Required Description
id String / Number true The step id. Required for any step
options Array true Array of options with { label, value, trigger } properties
end Boolean false if true indicate that this step is the last
inputAttributes Object Set any attributes on the input field (keyboardType, autoCapitalize, autoComplete)
metadata Object Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format

Example:

{
  id: '1',
  options: [
    { value: 1, label: 'Number 1', trigger: '3' },
    { value: 2, label: 'Number 2', trigger: '2' },
    { value: 3, label: 'Number 3', trigger: '2' },
  ],
}

Custom Step

Name Type Required Description
id String / Number true The step id. Required for any step
component Component true Custom React Component
replace Boolean false if true indicate that component will be replaced by the next step
waitAction Boolean false if true indicate that you waiting some action. You must use the triggerNextStep prop in your component to execute the action
asMessage Boolean false f true indicate that the component will be displayed as a text step
trigger String / Number / Function false The id of next step to be triggered. If function, it will receive ({ value, steps }) params
delay Number false set the delay time to component be shown
end Boolean false if true indicate that this step is the last
inputAttributes Object Set any attributes on the input field (keyboardType, autoCapitalize, autoComplete)
metadata Object Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format

Example:

{
  id: '1',
  component: <CustomComponent />
  trigger: '2'
}

Update Step

Name Type Required Description
id String / Number true The step id. Required for any step
update String / Number true The id of next step to be updated
trigger String / Number / Function false The id of next step to be triggered. If function, it will receive ({ value, steps }) params
inputAttributes Object Set any attributes on the input field (keyboardType, autoCapitalize, autoComplete)
metadata Object Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format

Example:

{
  id: '1',
  options: [
    { value: 1, label: 'Number 1', trigger: '3' },
    { value: 2, label: 'Number 2', trigger: '2' },
    { value: 3, label: 'Number 3', trigger: '2' },
  ],
}

Custom Component

When you declare a custom step, you need indicate a custom React Component to be rendered in the chat. This custom component will receive the following properties.

Name Type Description
previousStep PropTypes.object Previous step rendered
step PropTypes.object Current step rendered
steps PropTypes.object All steps rendered
triggerNextStep({ value, trigger }) PropTypes.func Callback function to trigger next step when user attribute is true. Optionally you can pass a object with value to be setted in the step and the next step to be triggered
inputAttributes Object Set any attributes on the input field (keyboardType, autoCapitalize, autoComplete)
metadata Object Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format

How to Contribute

Please check the contributing guide

Authors

Lucas Bassetti
Lucas Bassetti

See also the list of contributors who participated in this project.

Donate

If you liked this project, you can donate to support it ❤️

paypal

License

MIT · Lucas Bassetti

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].