Introduction

The Widget API enables you to get and set the properties of a site widget created using a self-hosted custom element. When you set a widget property, it triggers the attributeChangedCallback() function of the custom element because widget properties are bound to the attributes of the custom element.

To use the Widget API, install the @wix/editor package using npm or Yarn:

Copy
1

or

Copy
1

Then import the widget module from @wix/editor:

Copy
1
Was this helpful?
Yes
No