Thankly SDK for JavaScript
    Preparing search index...

    Function thanklyWidgetFactory

    • Factory function to create widget instances. Widgets are created lazily via dynamic imports.

      Parameters

      • api: ThanklyApi

        ThanklyApi instance for API calls

      Returns ThanklyWidgets

      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');