# Replicate ui\_button with ui\_template

**URL:** <https://discourse.nodered.org/t/replicate-ui-button-with-ui-template/76255>\
**Category:** Dashboard\
**Created:** [7 March 2023 17:52 UTC](https://discourse.nodered.org/t/replicate-ui-button-with-ui-template/76255 "2023-03-07T17:52:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mortimer](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@Mortimer](https://discourse.nodered.org/u/Mortimer)\
**Post date:** [7 March 2023 17:52 UTC](https://discourse.nodered.org/t/replicate-ui-button-with-ui-template/76255/1 "2023-03-07T17:52:49Z")

</div>

Dear all,

How can I get ui\_button closely replicated by ui\_template with same feature set?

My first idea was to carve out the `<md-button>` part from:

> <https://github.com/node-red/node-red-dashboard/blob/master/src/components/ui-component/templates/button.html>

and copy it to a ui\_template node. Certainly I did not expect this to work directly and so it did. For example, one of the challenges I see is the custom ui\_template `<md-card>` built around the `<md-button>` with the class `nr-dashboard-template` instead of `nr-dashboard-button`. Is there any chance to solve this problem? Also I would like to define similar to the ui\_button the icon, label, color, etc.

The motivation for this is to get the ui\_button distinguishing normal/long press: [Ui\_button: distinguish normal and long push - #3 by Mortimer](https://discourse.nodered.org/t/ui-button-distinguish-normal-and-long-push/76247/3)

---

<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:** [6 April 2023 17:53 UTC](https://discourse.nodered.org/t/replicate-ui-button-with-ui-template/76255/2 "2023-04-06T17:53:35Z")

</div>

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