explore more widgets
Widget Settings Reference
See in real time how your widget settings are structured in the settings object with real data!
screenshots
description
THIS IS NOT FOR ACTUALLY EMBEDDING, YOU DO NOT HAVE TO EMBED THE <ws-widget> ELEMENT ON YOUR WEBSITE, IT'S MEANT TO BE USED WITH THE PREVIEW ONLY.
Create an instance and fill out the settings page however you want.
The preview will list all settings in the format the settings object from WidgetStar is actually structured. No more guessing!
Note, the settings fields in this Reference are called after their key from the field type dropdown when editing a widget's setting. Obviously, a setting can be called favourite_animal instead of text. In this case, the key settings pair would be favourite_animal: tiger instead of text: tiger.
For iframes:
Read the settings with WS.settings. You can also read settings from the settings query parameter.
Then access a property with WS.settings.text for example.
For scripts:
At the top of your script, read the mount element and settings WidgetStar provides:
const element = document.currentScript.parentElement;
const settings = JSON.parse(decodeURIComponent(document.currentScript.dataset.settings));
Then access a property with settings.text for example.
For questions @abitofbaileys on nekoweb discord.
Create an instance and fill out the settings page however you want.
The preview will list all settings in the format the settings object from WidgetStar is actually structured. No more guessing!
Note, the settings fields in this Reference are called after their key from the field type dropdown when editing a widget's setting. Obviously, a setting can be called favourite_animal instead of text. In this case, the key settings pair would be favourite_animal: tiger instead of text: tiger.
For iframes:
Read the settings with WS.settings. You can also read settings from the settings query parameter.
Then access a property with WS.settings.text for example.
For scripts:
At the top of your script, read the mount element and settings WidgetStar provides:
const element = document.currentScript.parentElement;
const settings = JSON.parse(decodeURIComponent(document.currentScript.dataset.settings));
Then access a property with settings.text for example.
For questions @abitofbaileys on nekoweb discord.
reviews
No ratings yet
Sign in to rate and review this widget.
No reviews yet. Be the first!