HTML Widget Examples
Example 1: Plain Text Advice
Datasource Setup
- Add datasource.
- Set
Type = HTTP. - Set
Title = adviceData. - Set
URL = https://api.adviceslip.com/advice. - Set
Refresh = 30seconds. - Save.
Widget Setup
- Add widget.
- Set
Type = HTML. - Set
Title = Advice. - Set
Header Text = Daily Advice. - Set
Render Mode = Plain Text (Safe). - Set
Height Blocks = 3. - Set
HTML/Text Path = adviceData.slip.advice. - Save.
Expected output: plain text advice sentence (no HTML interpretation).
Example 2: Trusted HTML Status Snippet
Datasource Setup
- Add datasource.
- Set
Type = HTTP. - Set
Title = statusSnippet. - Set
URL = https://httpbin.org/anything?snippet=%3Cdiv%20style%3D%22padding%3A8px%3Bbackground%3A%2318242f%3Bcolor%3Awhite%3Bborder-radius%3A6px%3Bfont-weight%3A600%22%3EService%20Status%3A%20%3Cspan%20style%3D%22color%3A%234ade80%22%3EOK%3C%2Fspan%3E%3C%2Fdiv%3E. - Set
Refresh = 60seconds. - Save.
Widget Setup
- Add widget.
- Set
Type = HTML. - Set
Title = Status Card. - Set
Header Text = Health. - Set
Render Mode = Trusted HTML. - Set
Height Blocks = 2. - Set
HTML/Text Path = statusSnippet.args.snippet. - Save.
Expected output: styled HTML card rendered in the widget.
Use Trusted HTML only with content you control.