Home Chat widget How to hide the chat icon and trigger the chat with a link or button

How to hide the chat icon and trigger the chat with a link or button

By Karri Koivuniemi • Last updated on Jan 23, 2025

If you want the chat window to stay hidden until someone clicks a specific link or button, we’ve got you covered.

Here’s how to set it up:

  1. Add the ID to Your Element
    On your site, locate the button, link, or any other element where you want users to click to open the chat. Then, add the following ID to that element:

    id="commslayer-widget-toggle"
    
    
  2. Example HTML Code
    Here’s an example of how it might look for a button:

    <button id="commslayer-widget-toggle">Chat with us</button>
    
    

    Or for a link:

    <a href="#" id="commslayer-widget-toggle">Open Chat</a>
    
    
  3. What Happens Next

    • Once this ID is added to an element, the chat icon will be hidden by default.

    • The chat window will only appear when a user clicks the element with the commslayer-widget-toggle ID.

That’s it! Simple, right?