Collapsible/Expandable Chat Bubble

Is there a way to implement a Collapsible/Expandable Chat bubble for botpress. The gif below explains it clearly (taken from slack). I want to have the capability to make responses that are greater than 40 characters output this chat bubble that expands/collapses. I’m not sure how botpress works enough to understand if you can alter the chat bubble (if char>40 use this script).


Thank you to whoever attempts to help me!

Hey there, welcome to Botpress!

Technically, this is possible, but not an out-of-the-box feature. The way you can do this is by creating your own small React-based wrapper around the text messages that will collapse them when they exceed your char limits.

Please have a look at these examples, they show how to create wrappers that will change the styling of messages in the Webchat.

In particular, you should look at this file, the ColorText component shows how simple it is.

Hope this helps!

I’m a little confused (still a beginner). Where do I create a new wrapper and how can I alter the original botpress chat bubble to apply it to.