Javascript library
Typebot Javascript library is open-source (check out the repository). Feel free to contribute if you're a developer and wish to improve its features.
Whenever a typebot is embedded on your website, you have access to commands to automatically trigger actions on your embedding depending on its type.
Popup
Open or Close a popup
You can use these commands:
Typebot.getPopupActions().open()
Typebot.getPopupActions().close()
You can bind these commands on a button element, for example:
<button onclick="Typebot.getPopupActions().open()">Open the popup</button>
Bubble
Open or close the proactive message
You can use this command:
Typebot.getBubbleActions().openProactiveMessage()
You can bind this command on a button element, for example:
<button onclick="Typebot.getBubbleActions().openProactiveMessage()">
Open proactive message
</button>
Open or close the typebot
You can use these commands:
Typebot.getBubbleActions().open()
Typebot.getBubbleActions().close()
You can bind these commands on a button element, for example:
<button onclick="Typebot.getBubbleActions().open()">Open the chat</button>