Can I use my own button to open the Rozz chatbot on my website?

Direct Answer

Detailed Explanation

HTML Structure

<rozz-searchbox id="rozz-searchbox" initial-status="link"></rozz-searchbox>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rozz Searchbox Example</title>
<script src="https://rozzum-bucket.rozz.site/rozz-searchbox.js"></script>
</head>
<body>
<div id="rozz-container">
<rozz-searchbox id="rozz-searchbox" initial-status="link"></rozz-searchbox>
</div>
<div>
<img src="https://your-bucket.amazonaws.com/example.com.png"
id="example.com"
data-domain="example.com"
alt=" my website"
title="Example Website"
style="cursor: pointer;">
</div>
<script>
document.getElementById('example.com').addEventListener('click', function() {
const domain = this.dataset.domain;
const searchbox = document.getElementById('rozz-searchbox');
if (searchbox) {
searchbox.openClickLink(domain); // Opens and connects the searchbox
}
});
</script>
</body>
</html>

Javascript

Customizing the Domain

<img src="https://example.com/logo.png" id="example" data-domain="example.com" alt="Example Domain" title="Example Domain" style="cursor: pointer;">

document.getElementById('example').addEventListener('click', function() {
const domain = this.dataset.domain;
const searchbox = document.getElementById('rozz-searchbox');
if (searchbox) {
searchbox.openClickLink(domain);
}
});

That’s how you can integrate and use the rozz-searchbox component in your HTML page with a single clickable element that sets the data-domain attribute dynamically based on user interaction.

Posted August 5, 2024

---

Explanations

HTML Structure

Javascript

Customizing the Domain

That’s how you can integrate and use the rozz-searchbox component in your HTML page with a single clickable element that sets the data-domain attribute dynamically based on user interaction. I hope this helps!

---

Research Foundation

Author

rozz@rozz.site | © 2026 ROZZ. All rights reserved.