All Projects → fredjens → react-conversational-ui

fredjens / react-conversational-ui

Licence: other
🤖 React conversational UI

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to react-conversational-ui

formz
A unified form representation in Dart used at Very Good Ventures 🦄
Stars: ✭ 262 (+413.73%)
Mutual labels:  forms
laminas-form
Validate and display simple and complex forms, casting forms to business objects and vice versa
Stars: ✭ 65 (+27.45%)
Mutual labels:  forms
ng-xform
esss.github.io/ng-xform/home
Stars: ✭ 18 (-64.71%)
Mutual labels:  forms
forms-bootstrap
👾 Bootstrap 4 forms for Nette framework
Stars: ✭ 17 (-66.67%)
Mutual labels:  forms
forms
Web forms with Substance.
Stars: ✭ 14 (-72.55%)
Mutual labels:  forms
flask-wtf
Simple integration of Flask and WTForms, including CSRF, file upload and Recaptcha integration.
Stars: ✭ 1,357 (+2560.78%)
Mutual labels:  forms
Vue Form Json Schema
Create forms using JSON schema. Bring your components!
Stars: ✭ 253 (+396.08%)
Mutual labels:  forms
ember-validated-form-buffer
A validated form buffer that wraps Ember Data models for use in forms.
Stars: ✭ 46 (-9.8%)
Mutual labels:  forms
blogging-app-with-Angular-CloudFirestore
A blogging application created with the help of Angular on front-end and Google Cloud Firestore on backend.
Stars: ✭ 45 (-11.76%)
Mutual labels:  forms
LC-switch
Superlight vanilla javascript plugin improving forms look and functionality
Stars: ✭ 31 (-39.22%)
Mutual labels:  forms
react-apollo-form
Build React forms based on GraphQL APIs.
Stars: ✭ 195 (+282.35%)
Mutual labels:  forms
enform
Handle React forms with joy 🍿
Stars: ✭ 38 (-25.49%)
Mutual labels:  forms
Build-Former
This is a library for building forms dynamically in Android.
Stars: ✭ 20 (-60.78%)
Mutual labels:  forms
altinn-studio
Next generation open source Altinn platform and applications.
Stars: ✭ 91 (+78.43%)
Mutual labels:  forms
insect
🛠 Highly customisable, minimalistic input x select field for React.
Stars: ✭ 33 (-35.29%)
Mutual labels:  forms
Formspree
Easy HTML form without PHP or JavaScript
Stars: ✭ 2,749 (+5290.2%)
Mutual labels:  forms
activiti-examples
Alfresco Process Services powered by Activiti Examples.
Stars: ✭ 58 (+13.73%)
Mutual labels:  forms
RapidFormBundle
Create Symfony forms at record speed using PHP 8 attributes!
Stars: ✭ 33 (-35.29%)
Mutual labels:  forms
form-saver
A simple script that lets users save and reuse form data.
Stars: ✭ 67 (+31.37%)
Mutual labels:  forms
FrontendForms
A module for ProcessWire CMS to create and validate forms on the frontend easily using the Valitron library.
Stars: ✭ 0 (-100%)
Mutual labels:  forms

🤖 React Conversational UI

A react component for conversational UI. Define your question and get the users input in return.

How to use

Define the questions

The questions supports these field.

  • text - the text for your question (string) (required)
  • image - url to a image (string)
  • buttons - if you want to have answer alternatives (array)
  • key - the key that will be returned with the questions. If not key defined the question will not be returned.

The React component

The component take these props:

  • questions - an array of questions.
  • onEnded - function to return the user input when session ends.
  • theme - styles and settings (optional)
import Conversation from '../containers/Conversation';

const App = (props) => {
  function getUserAnswers(answers) {
    console.log('answers', answers);
  }

  return (
    <div>
      <Conversation
        questions={questions}
        onEnded={getUserAnswers}
        theme={theme}
      />
    </div>
  );
}

💅 Themeing

You can customize the size, colors, fonts and avatars.

const theme = {
  blobColor: 'cyan',
  userBlobColor: 'deeppink',
  user: '👀',
  bot: '😾',
  baseColor: '#ccc',
  font: "'courier', monotype",
  height: '500px',
  width: '500px',
};

Example questions

Questions:

const questions = [{
    text: 'Hello!',
  }, {
    text: 'What is your first name?',
    key: 'firstName',
  }, {
    text: 'How are you?',
    key: 'emotion',
    buttons: [{
      text: 'Awesome!',
      value: 'great',
    }, {
      text: 'Good',
      value: 'good',
    }, {
      text: 'Could be better',
      value: 'medium',
    }, {
      text: 'Not so good...',
      value: 'bad',
    }]
  }, {
    text: 'Do you like this image?',
    key: 'imageLike',
    image: 'https://unsplash.it/400/300/?random',
    buttons: [{
      text: 'Yes, looks great!',
      value: 'yes',
    }, {
      text: 'No really...',
      value: 'no',
    }]
}];

📦 Dependencies

  • Create React App <3
  • Styled Components
  • Flexbox
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].