Wix Blocks: About the Widget Code

Wix Blocks is open to all Wix Studio users. To get access to Blocks, join Wix Studio.

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

Widget Code

Add code to your widget to provide the following:

  • Custom functionality and interactions. Adding Velo code to your widget is just like adding code to a site page in the Wix Editors. Use this to implement your widget's internal business logic. Note that Blocks has a Properties and Events panel for your widget's elements. 
  • 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:

  1. Make sure you are in the Design tab of your widget. 
  2. Write your code in code editor in the bottom part of your screen. 

Was this helpful?