WLAB Widgets Development

Init via UIDs

Init via Event (no API)

Test Config (copy to console)

Wlab.widgets.init({ uids: [] });

window.dispatchEvent(new CustomEvent('wlab:widget:applySettings', {
  detail: {
    widgetCode: 'fortune',
    skinCode: 'classic',
    colors: { text: '#001240', primary: '#0042ED', secondary: '#FF4D00', background: '#ffffff' },
    colorMode: 'light',
    font: { family: 'Onest', files: [] },
    texts: {
      winText: 'Ожидайте звонка!',
      winHeader: 'Поздравляем!',
      buttonText: 'Крутить',
      mainHeader: 'Колесо фортуны',
      secondHeader: 'Выиграйте приз',
      thirdHeader: ''
    },
    triggers: { timer: { enabled: false, timeout: 5 }, button: { enabled: true, icon: null, size: 'lg', shape: 'circle', animation: true, background: '#0042ED', viewVariant: 'bottom-right' }, onExit: { enabled: false }, javascript: { enabled: false, events: [] } },
    hideLogo: true,
    settings: { phone: true, email: false, winAnimation: true },
    countdownEndDate: false,
    spinCountDown: null,
    urlPrivacyDoc: '',
    wheelUrl: ''
  }
}));