Blocks custom panels are made of unique panel elements.
To reference the panel elements in your widget's code, go to the code section of the Panels tab.
Use the $w() function to select elements by ID, for example:
The following panel elements are available to use in your panels. Click each element to see how to reference it in your panel code:
Import the following modules to interact with the panel elements in your panel code:
The widget SDK module lets you interact with your widget's properties and design presets from a panel.
The wix-editor Velo module lets you open Dashboard pages from a panel, and remove or restore elements.
Here is a short description of each element and anything special you should know about it.
Panel sliders allow users to select a number from a given range.
Thumbnails allow users to select an item from a set of thumbnail images.
A button on your panel. Add the button logic through code or button rules.
Do not include the word "Design" in your button label, as this triggers the default design panel.
Checkbox groups are used for selecting any number of the given options.
Drop-downs are used for selecting one of a number of options.
Radio button groups are used for selecting one of a number of options.
A text element (also called "rich text") is used to display text followed by a link.
An input element that lets users enter small amounts of text.
Toggle switches are used for a single binary choice.
Section dividers display a section heading in the panel.
Color pickers allow a site builder to select a color for one or multiple elements.
$w('#panelColorPicker1');
Font and color pickers allow site builders to select a font and its color.
Note: You must add at least one line of code to see how the element works in the editor. For example: $w(panelFontAndColorPicker1);