Skip to main content

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

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:
TryOnWidget.init({
  apiKey: 'wearo_xxxxxxxxxxxxxxxxxxxx',
  triggerText: 'Virtual try-on'
});
Or force the locale without overriding the text:
TryOnWidget.init({
  apiKey: 'wearo_xxxxxxxxxxxxxxxxxxxx',
  locale: 'fr'  // 'en' | 'fr'
});

Injection mode

The widget supports two button placements, controlled by injectionMode:
ModeDescription
'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
TryOnWidget.init({
  apiKey: 'wearo_xxxxxxxxxxxxxxxxxxxx',
  injectionMode: 'both',
  buyboxSelector: 'button[name="add"]',
  buyboxPosition: 'before',
});

Overlay button position

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:
buyboxBadge: { text: 'NEW' }       // English
buyboxBadge: { text: 'NOUVEAU' }   // French

Full button theming

See Brand color & styling → for buttonTheme / overlayTheme customization.