Interactive testing and documentation
Click a preset or choose custom colors:
| Parameter | Type | Description |
|---|---|---|
hide_button |
boolean | Set to true to hide the floating button (headless mode) |
primary_color |
hex | Button primary color (without #). Example: ff6b6b |
secondary_color |
hex | Button secondary color for gradient (without #). Example: ee5a24 |
button_bottom |
CSS unit | Button distance from bottom. Widget positions above button. Example: 20px, 5%, 2rem |
button_right |
CSS unit | Button distance from right. Widget aligns with button. Example: 20px, 5%, 2rem |
initial_focus |
boolean | Auto-focus message input when chat opens |
| Method | Description |
|---|---|
YounmeChat.open() |
Open the chat widget |
YounmeChat.close() |
Close the chat widget |
YounmeChat.toggle() |
Toggle chat open/closed |
YounmeChat.isOpen() |
Returns true if chat is open |
YounmeChat.showButton() |
Show the floating button |
YounmeChat.hideButton() |
Hide the floating button |
YounmeChat.ready(callback) |
Execute callback when SDK is loaded |
Note: All methods are safe to call before SDK loads. Operations are queued and executed when ready.
Add one script tag to your website:
Position the button (and widget) anywhere on the screen:
Hide the default button and control via JavaScript: