
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
react-chatflow
Advanced tools
[](https://www.npmjs.com/package/react-chatflow)
React library that helps you to emulate a simple chatflow between a real user and a bot.
Download the package:
npm install --save react-chatflow
import Chatflow from 'react-chatflow';
const messages = [
{message: '- Conversation start -', from: 'system'},
{message: "Josh, I need your email to register on our service", from: "bot"},
{message: "sure", from: "user"},
{message: "josh@email.com", from: "user"},
{message: "thx, Josh", from: "bot"},
{message: "and your phone number", from: "bot"},
{message: '- Some system message again -', from: "system"},
{message: "+47-JOSH-PHONE", from: "user"},
{message: "great, thanks a lot", from: "bot"},
{message: "have a nice day!", from: "bot"}
];
<Chatflow
messages={messages}
/>
| Property | Type | Default value | Description |
|---|---|---|---|
messages | array | - | Array of messages to display (see message structure for detailed info) |
width | number | 300 | Width (in px) of chat area |
height | number | 300 | Height (in px) of chat area |
typingDuration | number | 1000 | Duration (in ms) while the typing indicator is shown for each message |
messageDelay | number | 1500 | Delay (in ms) before each message is shown |
onInit | function | - | Callback that is called with no params after the init |
autoPlay | bool | false | If set to true, messages will start showing without the user interaction |
messageClassName | string | - | Custom class name that will be added to each message |
leftMessageClassName | string | - | Custom class that will be added to each message from the bot |
rightMessageClassName | string | - | Custom class that will be added to each message from the real user |
systemMessageClassName | string | - | Custom class that will be added to each message from the system |
messageTextClassName | string | - | Custom class that will be added to the text of each message |
containerClassName | string | - | Custom class that will be added to the chat container |
messageAvatarClassName | string | - | Custom class name that will be added to each avatar |
typingIndicatorClassName | string | - | Custom class name that will be added to the typing indicator |
typingIndicatorInnerClassName | string | - | Custom class name that will be added to the inner part of the typing indicator |
startBtnClassName | string | - | Custom class name that will be added to the button that starts the chatflow |
| Field | Type | Required | Description |
|---|---|---|---|
message | string | yes | Displayed text |
from | string | yes |
|
delay | number | no | Custom delay (in ms) before this message is shown |
typingDuration | number | no | Custom duration (in ms) while the typing indicator is shown for this message |
MIT
FAQs
[](https://www.npmjs.com/package/react-chatflow)
The npm package react-chatflow receives a total of 1 weekly downloads. As such, react-chatflow popularity was classified as not popular.
We found that react-chatflow demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.