Web Snippet Vapi Button along the website
# support
g
I put a web snippet on my website, but i need Vapi Call Button to The Screen So It Follows Along when you scroll, the button it maintains static , how i can fix that?
v
@gotaluism To make the Vapi Call Button follow along when you scroll, you'll need to apply a CSS style that positions the button fixed on the screen. You can achieve this by adding custom CSS to the
.vapi-btn
class. Here's an example of how you can do it:
Copy code
css
.vapi-btn {
  position: fixed;
  bottom: 20px; /* Adjust as needed */
  right: 20px; /* Adjust as needed */
  z-index: 1000; /* Ensure it's above other elements */
}
This CSS snippet will position the Vapi Call Button at the bottom-right corner of the screen, and it will stay there even when the user scrolls. You can adjust the
bottom
and
right
values to place the button exactly where you want it on your website. Remember to add this CSS to your website's stylesheet or within a
<style>
tag in the HTML where the Vapi widget is embedded. If you need further assistance with the implementation, please let me know!
You can continue this conversation by mentioning me in the message.
Got it. Tagging @User for additional help.
g
ok
@User
html code: the same code from the documentation of vapi web snippet css code: .vapi-btn { position: fixed; bottom: 20px; /* Adjust as needed */ right: 20px; /* Adjust as needed */ z-index: 1000; /* Ensure it's above other elements */ }
s
@gotaluism Sorry for the late response. Are you still experiencing this problem? If so, could you send over github repo link with code where your trying to use vapi script tag?
g
Yes, I’m still having the problem
Give me 10minutes I send you the code
in the index.html from the line 54 to the line 107
s
@gotaluism I have looked into your code you have to make changes to Vapi button css using javascript to give it a scroll effect or other effect using Javascript. You have to change the css of
#vapi-support-btn
button. For reference you can take a look at this code which hids the button from the dashboard or UI https://codesandbox.io/p/sandbox/nedzo-vapi-2s4nnq
g
Perfect!! Give me some hours I arrive home and I can confirm you if it’s working
Thank you a lot !!!
17 Views