GithubHelp home page GithubHelp logo

robrechtme / stream-chat-react Goto Github PK

View Code? Open in Web Editor NEW

This project forked from getstream/stream-chat-react

1.0 1.0 0.0 280.59 MB

Stream Chat official react SDK

Home Page: https://getstream.io/chat/sdk/react/

License: Other

Makefile 0.14% HTML 0.15% JavaScript 39.64% Shell 0.22% Python 0.21% TypeScript 59.64%

stream-chat-react's Introduction

Official React SDK for Stream Chat

react native chat

The official React components for Stream Chat, a service for building chat applications.

NPM build Component Reference codecov

Quick Links

With our component library, you can build a variety of chat use cases, including:

  • Livestream like Twitch or YouTube
  • In-game chat like Overwatch or Fortnite
  • Team-style chat like Slack
  • Messaging-style chat like WhatsApp or Facebook's Messenger
  • Customer support chat like Drift or Intercom

React Chat Tutorial

The best way to get started is to follow the React Chat Tutorial. It shows you how to use this SDK to build a fully functional chat application and includes common customizations.

Free for Makers

Stream is free for most side and hobby projects. To qualify, your project/company must have no more than 5 team members and earn less than $10k in monthly revenue. For complete pricing and details visit our Chat Pricing Page.

Installation

Install with NPM

npm install react react-dom stream-chat stream-chat-react

Install with Yarn

yarn add react react-dom stream-chat stream-chat-react

Install via CDN

<script src="https://cdn.jsdelivr.net/npm/[email protected]/umd/react.production.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/react-dom@16/umd/react-dom.production.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/stream-chat"></script>
<script src="https://cdn.jsdelivr.net/npm/stream-chat-react"></script>

Example Apps

We have built five demo applications showcasing a variety of chat use cases, including social messaging, team collaboration, customer support, livestream gaming, and virtual event. You can preview these demos on our website. Also, the code is open source.

Docs

We use a doc generator to build our component documentation. We provide a brief description of each chat component and define all of the props it accepts.

The React components are created using the stream-chat-js library. If you're customizing the components, it's likely you'll need to make additional calls to our Chat API using our JavaScript client, which has documentation on our website.

TypeScript Support

As of version 5.0.0, the component library has been converted to TypeScript. Please read the TypeScript guide for details and implementation assistance.

Component Reusability

For components that implement significant logic, it's helpful to split the component into two parts: a top-level component which handles functionality and a lower level component which renders the UI. This way you can swap UI without altering the logic that gives the component its functionality. We use this provider/consumer pattern frequently in the library, and the below example shows how to swap out the Message UI component with MessageTeam, without affecting any logic in the app.

<Channel Message={MessageTeam}>
  <Window>
    <ChannelHeader />
    <MessageList />
    <MessageInput />
  </Window>
  <Thread />
</Channel>

Customizing Styles

The preferred method for overriding the pre-defined styles in the library is to two step process. First, import our bundled CSS into the file where you instantiate your chat application. Second, locate any Stream styles you want to override using either the browser inspector or by viewing the library code. You can then add selectors to your local CSS file to override our defaults. For example:

import 'stream-chat-css/dist/css/index.css';
import './App.css';

Internationalization

Our library supports auto-translation for various user languages. Please read our internationalization documentation for further details and setup guidance.

Contributing

We welcome code changes that improve this library or fix a problem. Please make sure to follow all best practices and add tests, if applicable, before submitting a pull request on GitHub. We are pleased to merge your code into the official repository if it meets a need. Make sure to sign our Contributor License Agreement (CLA) first. See our license file for more details.

We are hiring!

We recently closed a $38 million Series B funding round and are actively growing. Our APIs are used by more than a billion end-users, and by working at Stream, you have the chance to make a huge impact on a team of very strong engineers.

Check out our current openings and apply via Stream's website.

stream-chat-react's People

Contributors

cardoso avatar chochek avatar danc5 avatar dependabot[bot] avatar drag0s avatar ericssartorius avatar ferhatelmas avatar giautm avatar jeltef avatar khanilov avatar kirankumarambati avatar mahboubii avatar nekuromento avatar nhannah avatar nikomancy avatar petyosi avatar pyrytakala avatar rcdvl avatar ruggi avatar satoshikawabata avatar tbarbugli avatar tilton avatar tschellenbach avatar tyleraholden avatar vicnicius avatar virdesai avatar vishalnarkhede avatar wastecleaner avatar yetieaterxb1 avatar zacheryconverse avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.