An open API service indexing awesome lists of open source software.

https://github.com/brandonmowat/react-chat-ui

๐Ÿ™Š A library of React components for building chat UI's.
https://github.com/brandonmowat/react-chat-ui

chat messenger react react-components ui ui-components

Last synced: 6 months ago
JSON representation

๐Ÿ™Š A library of React components for building chat UI's.

Awesome Lists containing this project

README

          

![react-chat-ui logo](https://i.imgur.com/YhPrFWw.png)

# ๐Ÿ™Š react-chat-ui

A library of React components for building chat UI's.

[![NPM](https://nodei.co/npm/react-chat-ui.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/react-chat-ui/)

## Sponsor

Sponsored by [Pusher Chatkit](https://pusher.com/chatkit?utm_source=github&utm_campaign=react-chat-ui-sponsorship):


Pusher Chatkit

## Features

* Auto scroll to bottom
* SUPER easy to use
* Multiple user grouping (try it out in the demo)

Keep in mind that this project is still in the early stages of development. If you encounter a bug or have a feature request, please create an issue and/or tweet at me [here](http://twitter.com/brandonmowat).

## Installation

`npm install react-chat-ui --save`

## Basic Usage

```javascript
import { ChatFeed, Message } from 'react-chat-ui'

// Your code stuff...

render() {

return (

// Your JSX...

// Your JSX...

)

}
```

Make sure to keep a list of proper message objects in your class state.
Like so:

```javascript
//...
this.state = {
messages: [
new Message({
id: 1,
message: "I'm the recipient! (The person you're talking to)",
}), // Gray bubble
new Message({ id: 0, message: "I'm you -- the blue bubble!" }), // Blue bubble
],
//...
};
//...
```

## API

* [ChatFeed](./src/ChatFeed)
* [Message](./src/Message)
* [ChatBubble](./src/ChatBubble)
* [BubbleGroup](./src/BubbleGroup)

## Contributing!ยก1 ๐Ÿ”ง

Contributions are always welcomed and encouraged. If you don't want to write a feature request yourself, let ya boi know (either on [Twitter](http://twitter.com/brandonmowat) or by creating a Pull Request) and I'll get that shit coded right up.

## TODO

* documentation
* documentation
* documentation

## Development

```sh
yarn dev
```