Creating a widget
1. In the Banner Builder, select the Widget tab in the Media Library.
2. Click ✚ -sign to create a new Widget, this will add a new Custom Widget asset to your Media Library.
Modifying the widget
To access the Widget asset configuration, either right-click the asset in the library and click Edit or hover the asset then click the green tab with the wrench icon. Here, you can change the name, icon, accessibility and other settings that are common to all types of assets. By clicking Edit code, you can access the code and settings that are exclusive for Custom widget assets.
For each setting there are five parameters; key, label, type, default value and icon.
- Key is a unique value identifier which you use to access your setting in the code.
- Label is the name which will be visible in the style panel. It's recommended to set the label to one or two words that makes it easy to identify the setting as a user.
· Text allows the user to input data via a textinput.
· URL allows the user to input a text which will be treated as an URL.
· Color will use a color picker.
· Number will use a -/+ step counter and number input.
· Boolean grants a On / Off selection.
· Select allows the user to select from a list of predefined items. The items are created by entering a value and then pressing enter in the Default value.
· Images allows the user to select from the images in the image gallery.
- Default value can be used to set a default value for the setting.
- Icon (using FontAwesome icons) can be used to set a describing icon for the setting.