# UIBuilder button

**URL:** <https://discourse.nodered.org/t/uibuilder-button/98970>\
**Category:** Dashboard\
**Tags:** dashboard-2, uibuilder\
**Created:** [5 September 2025 14:04 UTC](https://discourse.nodered.org/t/uibuilder-button/98970 "2025-09-05T14:04:07Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 September 2025 09:40 UTC](https://discourse.nodered.org/t/uibuilder-button/98970/21 "2025-09-08T09:40:17Z")

</div>

For v7.5.0, I've updated the `status-side-panel` CSS class so that it now takes a `--status-color` CSS variable. Makes life easier for changing the status colour. You can simply change it as a style attribute in HTML or as `elPanel.style.setProperty('--status-color', 'green')` in JavaScript.

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [10 September 2025 15:52 UTC](https://discourse.nodered.org/t/uibuilder-button/98970/22 "2025-09-10T15:52:51Z")

</div>

> [@gerry](#):
>
> Would it be possible for you (@Paul-Reed ) to post a flow?

Sorry Gerry, I've not been around much last few days...  
A flow wouldn't really help as the html, JavaScript & CSS is published in full in the git repo (link above), and could not be exported as a 'flow'.  
Also my NR flow is heavily linked into other flows & data sources, without which, the flow would do nothing.

---

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [10 September 2025 16:58 UTC](https://discourse.nodered.org/t/uibuilder-button/98970/23 "2025-09-10T16:58:03Z")

</div>

So… went to your git hub site and got code and sort of got your buttons working in db2. I opened another post to address not being able to input to buttons.

Thanks for the response though

---

<div class="post-metadata">

**Author:** ![grawsom](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grawsom/32/53070_2.png) [@grawsom](https://discourse.nodered.org/u/grawsom)\
**Post date:** [10 September 2025 19:41 UTC](https://discourse.nodered.org/t/uibuilder-button/98970/24 "2025-09-10T19:41:41Z")

</div>

Fast execution 👌

@TotallyInformation  
I want to learn more of UIBuilder, but before i go any further maybe you can answer some question regarding my "project" - if it is even possible.

I want to make a grid with buttons, maybe 5 col 10 rows, button as we have talked here about, but with 2 lines - line 1 equal ""name" and line 2 "status" could be on/off color green/red.

At statup data are read from an external file eg. CSV file containing two col "ID" and "name", ID (001 - 050) need to be used for the button, because that ID needs to be used later for an external program, name from file is for line 1 on button.

I saw some of you examples where you "build" the html code, but I have not found any thing that help me, or maybe I just don't see it.

I have something started in DB2, but it seems like when you need to handle 50 buttons, it's a pain in the b.....

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [11 September 2025 00:10 UTC](https://discourse.nodered.org/t/uibuilder-button/98970/25 "2025-09-11T00:10:43Z")

</div>

> [@grawsom](#):
>
> I want to make a grid with buttons, maybe 5 col 10 rows, button as we have talked here about, but with 2 lines - line 1 equal ""name" and line 2 "status" could be on/off color green/red.

Yes, perfectly possible. You can easily use a CSS Grid layout for this.

> [@grawsom](#):
>
> At statup data are read from an external file eg. CSV file containing two col "ID" and "name", ID (001 - 050) need to be used for the button, because that ID needs to be used later for an external program, name from file is for line 1 on button.

Yes, you can either do that from node-red or from the front-end, but from node-red is easiest.

> [@grawsom](#):
>
> I saw some of you examples where you "build" the html code, but I have not found any thing that help me, or maybe I just don't see it.

UIBUILDER has several ways you can use to generate front-end code. We don't have a specific simple node that will do what you want directly. However, you can either build a low-code object yourself or, possibly easier in this case, use a standard node-red template node (not a ui\_template but rather the core template node that can use mustache templating) to build the HTML structure from your input data and send it straight to the front end by using a uib-element node set to html mode.

To recap that, a core template node can build your HTML directly using Mustache templating (you could also do that manually using a function node). Or you could build uibuilder's low-code object yourself using a function node. Either method will let you use some input data to build the 2 lines of buttons. It just depends whether you are more comfortable using Mustache to create HTML, or creating a JavaScript object using the uibuilder low-code schema which closely follows HTML but using a standardised data structure which is described in the documentation.

---

<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:** [25 September 2025 00:11 UTC](https://discourse.nodered.org/t/uibuilder-button/98970/26 "2025-09-25T00:11:00Z")

</div>

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

[Previous page](https://discourse.nodered.org/t/uibuilder-button/98970.md?page=1)
