# Pre-pend to a widget

**URL:** <https://discourse.nodered.org/t/pre-pend-to-a-widget/40962>\
**Category:** Dashboard\
**Created:** [14 February 2021 08:46 UTC](https://discourse.nodered.org/t/pre-pend-to-a-widget/40962 "2021-02-14T08:46:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fmarzocca](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fmarzocca/32/35901_2.png) [@fmarzocca](https://discourse.nodered.org/u/fmarzocca)\
**Post date:** [14 February 2021 08:46 UTC](https://discourse.nodered.org/t/pre-pend-to-a-widget/40962/1 "2021-02-14T08:46:42Z")

</div>

Hi,

I have a bunch of ui-switches in my dashboard and I would like to prepend to each Label an icon (or a "led") like this mock-up:

![example](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/0/903132b5b771ba44c4f8e331e5ea002cc05cc71a.jpeg)

Maybe I could use a template node, but I am not clear about how/where to start....

Thanks for any assistance.

Fabio

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [14 February 2021 09:06 UTC](https://discourse.nodered.org/t/pre-pend-to-a-widget/40962/2 "2021-02-14T09:06:25Z")

</div>

Here is basics how to achieve that.

```auto
[{"id":"b10e16c2.e095d8","type":"ui_switch","z":"a05ff4cd.1ae7e8","name":"","label":"<i class=\"fa fa-circle glowyellow\"></i> FIRE","tooltip":"","group":"2caa6e4c.830752","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":false,"x":430,"y":420,"wires":[[]]},{"id":"fc0a6f9b.54409","type":"ui_template","z":"a05ff4cd.1ae7e8","group":"2caa6e4c.830752","name":"dashboard CSS","order":2,"width":0,"height":0,"format":"<style id=\"customized-styles\">\n .glowyellow{\n color: yellow;\n text-shadow: 0 0 8px yellow;\n }\n</style>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"global","x":340,"y":380,"wires":[[]]},{"id":"2caa6e4c.830752","type":"ui_group","name":"Default","tab":"20934cee.3e6c14","order":1,"disp":true,"width":"6","collapse":false},{"id":"20934cee.3e6c14","type":"ui_tab","name":"Tab 1","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![fmarzocca](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fmarzocca/32/35901_2.png) [@fmarzocca](https://discourse.nodered.org/u/fmarzocca)\
**Post date:** [14 February 2021 09:10 UTC](https://discourse.nodered.org/t/pre-pend-to-a-widget/40962/3 "2021-02-14T09:10:01Z")

</div>

Great, thank you very much!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [28 February 2021 09:10 UTC](https://discourse.nodered.org/t/pre-pend-to-a-widget/40962/4 "2021-02-28T09:10:18Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
