Blocks lets you add Velo code to your widgets and apps. You can add code to an individual widget, as well as code for the entire app.
Add code to your widget to provide the following:
- Custom functionality and interactions. Select widget elements using their IDs and bind them to code, work with Wix's frontend and backend APIs, and more.
- Widget API. Your widget API enables you to add properties, functions and events to the entire widget. These are exposed when your widget is installed on a site (in the Wix Editors) or when it's added inside another widget.
To add code to your widget:
- Make sure your widget is selected in the Widgets and Design panel.
- Write your code in code editor in the bottom part of your screen.