Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@chatscope/chat-ui-kit-react

chatscope93.8kMIT2.0.3TypeScript support: included

React component library for creating chat interfaces

chat, react, reactjs, ui, user interface, components, ui kit, communication, conversation, toolkit, library, frontend, reusable, feed, comments, social, talk

readme

Chat UI Kit React

Actions Status npm version code style: prettier semantic-release Storybook

Build your own chat UI with React components in a few minutes.
The Chat UI Kit from chatscope is an open source UI toolkit for developing web chat applications.

Tired of struggling with sticky scrollbars, contenteditable, responsiveness, css hacks?
This kit is for you! See all features.

Chat UI Kit brings you chat UI development at warp speed 🚀

Demo

Demos index: https://chatscope.io/demo.

Install

Component library

Using yarn:

yarn add @chatscope/chat-ui-kit-react

Using npm:

npm install @chatscope/chat-ui-kit-react

Styles

Using yarn:

yarn add @chatscope/chat-ui-kit-styles

Using npm:

npm install @chatscope/chat-ui-kit-styles

Usage

ESM

import styles from "@chatscope/chat-ui-kit-styles/dist/default/styles.min.css";
import {
  MainContainer,
  ChatContainer,
  MessageList,
  Message,
  MessageInput,
} from "@chatscope/chat-ui-kit-react";

<div style={{ position: "relative", height: "500px" }}>
  <MainContainer>
    <ChatContainer>
      <MessageList>
        <Message
          model={{
            message: "Hello my friend",
            sentTime: "just now",
            sender: "Joe",
          }}
        />
      </MessageList>
      <MessageInput placeholder="Type message here" />
    </ChatContainer>
  </MainContainer>
</div>;

Yeah! Your first chat GUI is ready!

UMD

UMD usage is documented in our Storybook.

Documentation

Check our friendly Storybook.

Typescript

The library is written in Javascript, but Typescript typings are available in the package since version 1.9.3.

See also

@chatscope/use-chat is a React hook for state management in chat applications.
Check it out and see how easy you can do the chat logic yourself.

Show your support

If you've made an awesome chat UI and you love this library, please ⭐ this repository!

Community and support

Website

https://chatscope.io

License

MIT

changelog

@chatscope/chat-ui-kit-react changelog

2.0.3 (2024-03-03)

Bug Fixes

  • added automatically provided github token to github workflow (3da88a0)
  • removed github token from github workflow (a674c0c)

2.0.2 (2024-03-03)

Bug Fixes

  • bump github actions and semantic-release (e87babc)

2.0.1 (2024-03-03)

Bug Fixes

  • bump node version in github workflow to 20 (2695c4d)

2.0.0 (2024-03-03)

chore

  • removed default props from function components (84a3302)

BREAKING CHANGES

  • defaultProps have been removed from all function components. It should be backward compatible, but it's safer to release the major version. The default props of some internal class components have also been rewritten. Bumped react and react-dom to 18.2.0 in devDependencies.

1.10.1 (2023-02-04)

Bug Fixes

  • typings: expansion panel generic (7bb6c0b)

1.10.0 (2023-02-04)

Features

  • expansion-panel: added controlled opening state (63c725b)

1.9.9 (2022-12-16)

Bug Fixes

  • types: fixed typings for TypingIndicator, content can be a ReactNode (4f5d2db)

1.9.8 (2022-11-16)

Bug Fixes

  • #76: rendering lastSenderName as a ReactNode (20d09fd), closes #76

1.9.7 (2022-07-18)

Bug Fixes

  • types: fixed typings for ExpansionPanel (9f9411f)

1.9.6 (2022-07-13)

Bug Fixes

  • types: added missing export of MessageListContent (213b15d)

1.9.5 (2022-07-12)

Bug Fixes

  • typings: wrong TypingIndicator export (de99cd8)

1.9.4 (2022-07-12)

Bug Fixes

1.9.3 (2022-06-15)

Bug Fixes

  • typings: base components props intersection with html components props (6637245)

1.9.2 (2022-06-14)

Bug Fixes

  • typings: renamed MessageGroup typings file (59d374a)

1.9.1 (2022-06-14)

Bug Fixes

  • typings: added missing *.d.ts files to the build (eeaa27e)

1.9.0 (2022-06-14)

Features

1.8.3 (2021-11-26)

Bug Fixes

  • #55 changed lastactivitytime prop type to node (7efcfb2)

1.8.2 (2021-10-11)

Bug Fixes

1.8.1 (2021-06-03)

Bug Fixes

  • as: custom component aliased with string is not displayed in production build (cbf8a04), closes #43

1.8.0 (2021-05-31)

Features

  • message-input: prop to messageinput that prevents send on return (98fc849)

1.7.2 (2021-05-16)

1.7.1 (2021-05-16)

1.7.0 (2021-05-05)

Features

  • message-input: added arguments to onChange and onSend (9f8b2cc)

1.6.1 (2021-04-19)

Bug Fixes

  • message-list: disableOnYReachWhenNoScroll property type (caeeead)

1.6.0 (2021-04-19)

Features

  • message-list: added disableOnYReachWhenNoScroll property (3176f2e)

1.5.2 (2021-04-12)

Bug Fixes

  • messageinput, commenteditable: fix bug that last korean character is entered twice (2986e2b)

1.5.1 (2021-04-03)

Bug Fixes

  • message list: cannot read property 'clientHeight' of null (705ede2)

1.5.0 (2021-03-24)

Features

  • message list: added autoScrollToBottomOnMount property (6ba92a8)

1.4.0 (2021-03-21)

Features

  • message-list: loading more loader at the bottom (e540cbc)

1.3.0 (2021-02-14)

Features

  • conversation-list: loading more in conversation list (e106ccb)

1.2.3 (2021-02-06)

Bug Fixes

  • message-list: scroll handling for grouped messages (2c8c9be)

1.2.2 (2021-01-24)

Bug Fixes

  • utils: handling as attribute for forwarded ref (73b95ab)
  • utils: is attribute changed to as (8eca5d4)

1.2.1 (2021-01-17)

Bug Fixes

  • messagelist: resizeobserver has been disabled in browsers that do not support it (a75859a)

1.2.0 (2021-01-04)

Features

  • #6: api method for scrolling to bottom in message input (3d0997a), closes #6

1.1.0 (2020-12-20)

Features

  • added new message content types (32439f7)

1.0.3 (2020-11-10)

Bug Fixes

1.0.2 (2020-09-23)

Performance Improvements

  • changed fa imports for better tree-shaking (4807854)

1.0.1 (2020-09-22)

1.0.0 (2020-09-22)

chore

BREAKING CHANGES

  • release: First stable release