Decimal object with the following methods.
Decimal.boot(options)
Manually initializes the widget. Required when usingdata-disable-autoboot.
| Parameter | Type | Description |
|---|---|---|
user_token | string | A signed JWT for authenticated sessions. Required when identity verification is enabled. |
metadata | object | Key-value pairs included with escalation tickets (e.g. account ID, plan type). |
Decimal.show()
Opens the chat widget programmatically. Equivalent to clicking the launcher button.Decimal.hide()
Closes the chat widget programmatically. Equivalent to clicking the launcher button again.Decimal.shutdown()
Removes the chat widget completely. CallDecimal.boot() again to restart from scratch.
Decimal.update(options)
Updates widget metadata after initialization. Merged with existing metadata and included when escalating to a human.| Parameter | Type | Description |
|---|---|---|
metadata | object | Key-value pairs to merge with existing metadata. |
Decimal.theme(options)
Customizes widget appearance. Can be called before or afterDecimal.boot(). To reset to defaults, call Decimal.theme(Decimal.DEFAULT_THEME).
Colors
| Parameter | Description | Default |
|---|---|---|
colorScheme | 'light' | 'dark' | 'auto'. Controls browser color scheme. | 'light' |
primaryColor | Launcher button, user message bubbles, action buttons. | #18181B |
backgroundColor | Widget background color. | #FFFFFF |
textColor | Headings, body text, input labels, “Powered by Decimal”. | #18181B |
textColorSecondary | Text on primary-colored elements (user messages, buttons). | #FFFFFF |
textColorMuted | Timestamps, secondary labels, metadata. | #71717A |
Position & Size
These options only affect the widget container in floating mode, designed for use withdata-hide-button. All values are CSS strings (e.g. '20px', '50%').
| Parameter | Description | Default |
|---|---|---|
width | Widget width. | 380px |
height | Widget height. | 640px |
top | Distance from top edge. | unset |
bottom | Distance from bottom edge. | 80px |
left | Distance from left edge. | unset |
right | Distance from right edge. | 20px |
transformOrigin | Animation origin point. | bottom right |
Button Position
Position the launcher button independently from the widget container.| Parameter | Description | Default |
|---|---|---|
buttonTop | Button distance from top edge. | unset |
buttonBottom | Button distance from bottom edge. | 20px |
buttonLeft | Button distance from left edge. | unset |
buttonRight | Button distance from right edge. | 20px |