A site widget is a core component of the user interface (UI) of your Wix Blocks app. Widgets are the parts of your app that visitors directly interact with, usually composed of various elements like buttons, input fields, images, and more.
This article explains how to add a site widget to your app using Wix Blocks.
Alternatively, you can ask the Blocks AI to generate your widget.
Elements are the UI components that make up your widget. You can add text, media, shapes, and other elements to your widget. If you are designing your widget from scratch, make sure to go over our design guidelines before adding elements.
Add Elements to open the Elements panel.Design presets allow you to create multiple designs for the same widget. The functionality remains the same, only the design changes.
More Actions icon to rename, duplicate, or delete a preset.Each element of your widget has an action bar that you can customize. For example, you can add a main action button, animations, and other elements to the action bar. The entire widget also has an action bar, for configuring settings and adding and removing elements. These action bars are used by a site builder who installs the app, to configure the widget and its elements.
You can change the user interface and create panels that are unique to your widget, which direct the flow and how the widget is used.
Add code to create your widget's custom functionality and interactions, or create your widget's public API.
widget code panel.
API to add properties, functions or events to your Widget API.
Properties & Events to add properties, events, and functions to your widget elements.Alternatively, you can ask the Blocks AI to generate the code for your widget.
Determine how your widget is presented in the editor with the Blocks installation settings. For example, which preset is the default preset and whether the widget is presented in the editor's Add + panel.