Widget API: The Chat Icon

Updated 9 days ago ​by Sara Pion

If you are on the Free plan and do not currently have the ability to use "Display When" targeting, you can hide or show the Drift chat icon using these API Commands:

Drift Widget

  • Hide - api.widget.hide()

  • Show - api.widget.show()

If you want to hide the chat icon on mobile devices, the first thing you should do is call drift.hide, then use: 
drift.on("ready", api => {
if (window.innerWidth >= 780) {

Was this article helpful?

Can’t find what you’re looking for?

Talk To Us