This is a modified script for using a React chatbot based on the docs here: https://botpress.com/docs/webchat-react-library
Use this to implement a better looking chatbot in your React website:
Features:
- Handle Events: The component includes the ability to handle events from the Chatbot. Currently events are logged to console. You can even control a website through these events.
- Dynamic Bot Switching: Ability to change the client ID dynamically, allowing for different bots to be used on different pages with the same component.
- Customizable Bot Information: Users can easily customize the bot's avatar, name, and description, which are displayed in the chat header.
- Improved Chat UI: The chat window remains in full view, including the header and the message input field, ensuring that they are always accessible.
- Scroll Fix: Ensures that even with a large number of messages, the input field remains accessible, and the chat component is always scrollable without losing UI elements.
- Fixed FAB Button Placement: The FAB button behavior is improved, ensuring it stays correctly positioned on the screen and closes correctly when the chat window is open or closed.
Video link: