Share feedback, ideas and get community help

Updated 4 months ago

Show Bubble only on Desktop

At a glance

The community members are discussing how to show a bubble on desktop devices and hide it on mobile devices. Some suggestions include using CSS, JavaScript to detect mobile devices, and putting the Typebot script inside a container on WordPress with responsive options. There is no explicitly marked answer, but the community members seem to agree that there is no native way to handle this in Typebot, and the suggested solutions involve using custom scripts or WordPress-specific features.

Has anyone try to only show the bubble on desktop and hide it on mobile devices? I was thinking it may have to be done by writing a Custom script. Please share if you have a better idea. Thanks
1
B
F
y
12 comments
Yes, that should be doable with CSS even. What’s your website builder?
this is a simple version of it like since most mobile screens are 768px
function isMobile() {
// Media query to check for specific screen width range commonly associated with mobiles
return window.matchMedia("(max-width: 768px)").matches;
}

// Usage example
if (isMobile()) {
console.log("Mobile device detected");
// Option to or not, load mobile-specific content or styles here
} else {
console.log("Laptop or desktop device detected");
// Option to, load desktop-specific content or styles here
}
it basically checks the screen width range
its not optimal for different screen but that you will have to tweak with
thanks @Baptiste . we use wordpress
appreciate the reply. i am aware about using JS to solve the initial problem of hiding the bubble altogether on mobile. I was kinda interested to know if there's more 'native' way to handle it via Typebots
No native way to do that 🙏
Why you dont put typebot script inside blocks/container on wordpress then use responsive option to enable it on desktop only?
What builder are you using on wordpress?
Yes that's what we're planning of doing
Add a reply
Sign up and join the conversation on Discord