Hi Team!
I have a client trying to remove the words “SEARCH” and “CLOSE” from an Answers overlay so that the button is just the magnifying glass inside a green circle, and I’m having trouble finding where to change it in code editor. If anyone could point me in the right direction I’d appreciate it, thank you!
Hey Ryan,
These properties are found in the integration rather than the frontend Code Editor. This client would have followed the integration steps for the overlay from the Adding a Search Bar guide. You can adjust the button text under the button
object with the properties text
and expandedText
. In this case, removing those properties will remove the words.
<script>
window.YxtAnswersOverlaySettings = {
domain: "REPLACE_ME_DOMAIN",
button: {
alignment: 'right',
color: { //update with your desired colors
background: '#808080',
text: '#FFFFFF'
},
text: 'Search',
expandedText: 'Close'
},
panel: {},
prompts: []
};
</script>
That makes so much sense, thank you! Is there a way to do this only for mobile and leave the text rendering on desktop?