> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wearo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Trigger button

> Customize the text, language, and position of the Wearo try-on button.

# Trigger button

## Button text

By default the label auto-detects from `<html lang>`, the page URL, then `navigator.language`:

* English → `"Try it on you"`
* French → `"Essayer sur moi"`

Override with a custom label:

```javascript theme={"dark"}
TryOnWidget.init({
  apiKey: 'wearo_xxxxxxxxxxxxxxxxxxxx',
  triggerText: 'Virtual try-on'
});
```

Or force the locale without overriding the text:

```javascript theme={"dark"}
TryOnWidget.init({
  apiKey: 'wearo_xxxxxxxxxxxxxxxxxxxx',
  locale: 'fr'  // 'en' | 'fr'
});
```

## Injection mode

The widget supports two button placements, controlled by `injectionMode`:

| Mode        | Description                                           |
| ----------- | ----------------------------------------------------- |
| `'overlay'` | Button rendered on top of the product image (default) |
| `'buybox'`  | Button injected near the Add to Cart button           |
| `'both'`    | Both at the same time                                 |

```javascript theme={"dark"}
TryOnWidget.init({
  apiKey: 'wearo_xxxxxxxxxxxxxxxxxxxx',
  injectionMode: 'both',
  buyboxSelector: 'button[name="add"]',
  buyboxPosition: 'before',
});
```

## Overlay button position

```javascript theme={"dark"}
overlayAlignment: 'center',  // 'center' | 'left' | 'right'
overlayBottom: '16px',       // distance from bottom of the image
overlayAutoHide: true,       // only visible on hover (desktop)
```

## Buybox badge

Add an optional badge on the buybox button:

```javascript theme={"dark"}
buyboxBadge: { text: 'NEW' }       // English
buyboxBadge: { text: 'NOUVEAU' }   // French
```

## Full button theming

See [Brand color & styling →](/configure/brand-color) for `buttonTheme` / `overlayTheme` customization.
