
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-chatbot-ui
Advanced tools


npm install react-chatbot-ui
// Example
...
import ChatBotUI, { MessageList, ButtonInput, TextInput } from 'react-chatbot-ui';
...
const config = {
width: '500px', // default: 400px
height: '400px', // default: 600px
inputBox: true, // show inputBox
sendCallback: (value: TextInput) => {
// TextInput { payload: string }
// InputBox's value and Clicked Button values are passed into this function
console.log(`you typed(clicked) text(button) ${value}`);
// you can update "messageList" here with input values for new message
},
buttonCallback: (value: ButtonInput) => {
// ButtonInput { payload: MessageButton }
console.log('button clicked', value);
},
};
const messageList: MessageList = [
{
mid: 1,
type: 'left',
text: 'Hello world'
},
{
mid: 2,
type: 'left',
youtube: 'https://www.youtube.com/watch?v=eDEFolvLn0A'
},
{
mid: 3,
type: 'right',
button: [
{ name: 'displayName1', value: 'buttonValue1' },
{ name: 'displayName2', value: 'buttonValue2' }
]
},
];
...
<ChatBotUI
config={config}
messageList={messageList}
/>
...
);
// Type
interface Message {
mid: number; // id of Message, should be unique
// (be used in react element's key)
type: 'left' | 'right'; // position of message balloon
text?: string; // text contents (support html)
image?: string; // image source
button?: Array<MessageButton> // buttons
youtube?: string; // youtube video url
}
interface MessageButton {
name: string;
value: any;
}
type MessageList = Array<Message>;
text, image, button, youtube cannot be used together.
you should use
immer.jsorimmutable.jsfor MessageList
Markdown Syntax
**bold***italic*~~strikethrough~~__underline__code : `code`[gincheong's github](https://github.com/gincheong)Enlarging image with click
Support Youtube video url
FAQs

The npm package react-chatbot-ui receives a total of 62 weekly downloads. As such, react-chatbot-ui popularity was classified as not popular.
We found that react-chatbot-ui 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.