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

or

Copy

Then import the widget module from @wix/editor:

Copy
Did this help?