Chat Icon

Use Case

You can use our api to hide and show the widget

hide() and show()

api.widget.hide() hides the widget.

api.widget.show() shows the widget.

Example

The example below shows how to the default state of the Chat Widget to hide. Only when the Window is wider than 780 does the widget show.

<script>
drift.on("ready", api => {
 api.widget.hide()
 
 if (window.innerWidth >= 780) {
  api.widget.show()
 }
  
})
</script>

Not using Drift yet? Get your free account here!

Chat Icon