Widget code lets you add custom functionality to your widget and expose an external API.
Add code to your widget to provide the following:
Where you add your widget code varies according to the tools you are using.
If you are working directly in the Blocks editor:
icon to add API properties, functions and events.
If you are using the Wix IDE for Blocks, add your widget code in the following locations:
site folder in the auto-generated file that has your widget's name.
icon to add API properties, functions and events.Important: The Blocks-CLI integration only works with the Wix CLI for Apps. The new Wix CLI, which is the recommended tool for new app projects, doesn’t support this integration.
If you are using the Blocks-CLI integration, add your widget code in the following files: