All Projects → kingofthestack → React Chat Window

kingofthestack / React Chat Window

Licence: unlicense
Intercom-style live chat window written in react

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to React Chat Window

Fiora
An interesting open source chat application. Developed with node.js, mongoDB, socket.io and react
Stars: ✭ 4,920 (+752.69%)
Mutual labels:  chat
Rasa Webchat
A feature-rich chat widget for Rasa and Botfront
Stars: ✭ 507 (-12.13%)
Mutual labels:  chat
Ejabberd
Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
Stars: ✭ 5,077 (+779.9%)
Mutual labels:  chat
Miaou
A chat server with OAuth2 authentication, persistent and searchable history, video and audio, markdown formatting, private and public rooms, stars, votes, embedded games, and many other features
Stars: ✭ 486 (-15.77%)
Mutual labels:  chat
Ajax Chat
A fully customizable web chat implemented in JavaScript, PHP and MySQL which integrates nicely with common forum systems like phpBB, MyBB, FluxBB, SMF and vBulletin. A Flash and Ruby based socket connection can be used to boost performance.
Stars: ✭ 497 (-13.86%)
Mutual labels:  chat
Vue Chat Scroll
🖱️ Vue directive to keep things scrolled to the bottom.
Stars: ✭ 517 (-10.4%)
Mutual labels:  chat
Thelounge
💬 ‎ Modern, responsive, cross-platform, self-hosted web IRC client
Stars: ✭ 4,618 (+700.35%)
Mutual labels:  chat
Zulip Desktop
Zulip Desktop Client
Stars: ✭ 556 (-3.64%)
Mutual labels:  chat
Aws Lex Web Ui
Sample Amazon Lex chat bot web interface
Stars: ✭ 500 (-13.34%)
Mutual labels:  chat
Deltachat Desktop
Email-based instant messaging for Desktop.
Stars: ✭ 526 (-8.84%)
Mutual labels:  chat
Kiwiirc
🥝 Next generation of the Kiwi IRC web client
Stars: ✭ 488 (-15.42%)
Mutual labels:  chat
Slacker
Slack Bot Framework
Stars: ✭ 495 (-14.21%)
Mutual labels:  chat
Chat
基于自然语言理解与机器学习的聊天机器人,支持多用户并发及自定义多轮对话
Stars: ✭ 516 (-10.57%)
Mutual labels:  chat
Vim Chat
💜 Chatting plugin for neovim and vim8
Stars: ✭ 475 (-17.68%)
Mutual labels:  chat
Chatengine
Open source mtproto server written in golang with compatible telegram client
Stars: ✭ 544 (-5.72%)
Mutual labels:  chat
Chat
Chat with your team while you collaborate over code using VS Live Share
Stars: ✭ 468 (-18.89%)
Mutual labels:  chat
Bitlbee
An IRC to other chat networks gateway 🐝
Stars: ✭ 513 (-11.09%)
Mutual labels:  chat
React Chat Elements
Reactjs chat elements chat UI, react chat components
Stars: ✭ 565 (-2.08%)
Mutual labels:  chat
Lemmy
🐀 Building a federated link aggregator in rust
Stars: ✭ 5,728 (+892.72%)
Mutual labels:  chat
Twitchlib
C# Twitch Chat, Whisper, API and PubSub Library. Allows for chatting, whispering, stream event subscription and channel/account modification. Supports .NET Core 2.0
Stars: ✭ 519 (-10.05%)
Mutual labels:  chat

Warning!

This repo is not actively maintained or developed by kingofthestack. PRs, issues, and feature requests may not receive any response.

Thank you for the support over the years for RCW! We appologize for the inconvenience.

react-chat-window

react-chat-window provides an intercom-like chat window that can be included easily in any project for free. It provides no messaging facilities, only the view component.

GitHub license

Demo gif of react-chat-window being used

Features

  • Customizeable
  • Backend agnostic
  • Free

Demo

Table of Contents

Installation

$ npm install react-chat-window

Example

import React, {Component} from 'react'
import {Launcher} from 'react-chat-window'

class Demo extends Component {

  constructor() {
    super();
    this.state = {
      messageList: []
    };
  }

  _onMessageWasSent(message) {
    this.setState({
      messageList: [...this.state.messageList, message]
    })
  }

  _sendMessage(text) {
    if (text.length > 0) {
      this.setState({
        messageList: [...this.state.messageList, {
          author: 'them',
          type: 'text',
          data: { text }
        }]
      })
    }
  }

  render() {
    return (<div>
      <Launcher
        agentProfile={{
          teamName: 'react-chat-window',
          imageUrl: 'https://a.slack-edge.com/66f9/img/avatars-teams/ava_0001-34.png'
        }}
        onMessageWasSent={this._onMessageWasSent.bind(this)}
        messageList={this.state.messageList}
        showEmoji
      />
    </div>)
  }
}

For more detailed examples see the demo folder.

Components

Launcher

Launcher is the only component needed to use react-chat-window. It will react dynamically to changes in messages. All new messages must be added via a change in props as shown in the example.

Launcher props:

prop type required description
agentProfile object yes Represents your product or service's customer service agent. Fields: imageUrl (string), teamName (string).
handleClick function yes Intercept the click event on the launcher. No argument sent when function is called.
isOpen boolean yes Force the open/close state of the chat window. If this is not set, it will open and close when clicked.
messageList [message] yes An array of message objects to be rendered as a conversation.
mute boolean no Don't play sound for incoming messages. Defaults to false.
newMessagesCount number no The number of new messages. If greater than 0, this number will be displayed in a badge on the launcher. Defaults to 0.
onFilesSelected function(fileList) no Called after file has been selected from dialogue in chat window.
onMessageWasSent function(message) yes Called when a message is sent, with a message object as an argument.
showEmoji boolean no Whether or not to show the emoji button in the input bar. Defaults to true.

Message Objects

Message objects are rendered differently depending on their type. Currently, only text, file, and emoji types are supported. Each message object has an author field which can have the value 'me' or 'them'.

{
  author: 'them',
  type: 'text',
  data: {
    text: 'some text'
  }
}

{
  author: 'me',
  type: 'emoji',
  data: {
    code: 'someCode'
  }
}


{
  author: 'me',
  type: 'file',
  data: {
    url: 'somefile.mp3',
    fileName: 'Any old name'
  }
}

Agent Profile Objects

Look like this:

{
  imageUrl: 'https://somewhere.on/the_web.png',
  teamName: 'Da best'
}

People Using react-chat-window

If you're using react-chat-window in a product I'd love to see what you're making! Email me at [email protected]

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].