Factory function to create widget instances. Widgets are created lazily via dynamic imports.
ThanklyApi instance for API calls
Widget factory with methods to create widget instances
const api = thanklyApiFactory({ apiHost: '...' });const widgets = thanklyWidgetFactory(api);const tryOn = await widgets.createVirtualTryOn({ catalogSlug: 'macys', onComplete: (result) => console.log(result)});tryOn.mount('container-id'); Copy
const api = thanklyApiFactory({ apiHost: '...' });const widgets = thanklyWidgetFactory(api);const tryOn = await widgets.createVirtualTryOn({ catalogSlug: 'macys', onComplete: (result) => console.log(result)});tryOn.mount('container-id');
Factory function to create widget instances. Widgets are created lazily via dynamic imports.