# How to make the dashboard-button in dashboard receive press&hold input

**URL:** https://discourse.nodered.org/t/how-to-make-the-dashboard-button-in-dashboard-receive-press-hold-input/86205
**Category:** General
**Tags:** node-red-dashboard, function-node
**Created:** [6 March 2024 19:08 UTC](https://discourse.nodered.org/t/how-to-make-the-dashboard-button-in-dashboard-receive-press-hold-input/86205 "2024-03-06T19:08:36Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Long4](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@Long4](https://discourse.nodered.org/u/Long4)
#### Post date: [6 March 2024 19:08 UTC](https://discourse.nodered.org/t/how-to-make-the-dashboard-button-in-dashboard-receive-press-hold-input/86205/1 "2024-03-06T19:08:36Z")

</div>

Hi I'm new to node-red and just learning how to make some simple application, I'd like to ask a few question  
1/ How can I make the dashboard receive press and hold input? I can do press once, but I have no clue how to do press&hold while the value go up every second  
2/ Can I press&hold the button on my phone?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/e/5ececacdafd263d7c4a343f7ae9dc73ffecde256.jpeg)  
3/ Can I make it so that when view the dashboard on different device it scale appropriately?  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/c/6c2fbee99375f70009ddaa92aaa8aee135ee7ece.png)  
Like I make the UI fit with smartphone but for window... well not so much

I'm stuck at this point and keep going back to drawing broad  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/1/c16274b89b69746d9824109d45ed5b2c236e777c.png)

Thank you for taking your time helping a newbie out

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [6 March 2024 19:14 UTC](https://discourse.nodered.org/t/how-to-make-the-dashboard-button-in-dashboard-receive-press-hold-input/86205/2 "2024-03-06T19:14:26Z")

</div>

Something like this: [How to make a button that send msg once on click and sends msg repeated at set interval on button hold? - #4 by Steve-Mcl](https://discourse.nodered.org/t/how-to-make-a-button-that-send-msg-once-on-click-and-sends-msg-repeated-at-set-interval-on-button-hold/62614/4) ?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [6 March 2024 19:23 UTC](https://discourse.nodered.org/t/how-to-make-the-dashboard-button-in-dashboard-receive-press-hold-input/86205/3 "2024-03-06T19:23:00Z")

</div>

I think this demo is more up-to-date (and supports mobile/touch: [Adding `output` function to buttons designed in `template` node - #65 by Steve-Mcl](https://discourse.nodered.org/t/adding-output-function-to-buttons-designed-in-template-node/25591/65)

---

<div class="post-metadata">

### Author: ![Long4](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@Long4](https://discourse.nodered.org/u/Long4)
#### Post date: [6 March 2024 19:24 UTC](https://discourse.nodered.org/t/how-to-make-the-dashboard-button-in-dashboard-receive-press-hold-input/86205/4 "2024-03-06T19:24:35Z")

</div>

yes kinda like what you did, I have tested it and I like it... thou I'm not familiar with html and I can't make the repeater button work on smartphone

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [6 March 2024 19:25 UTC](https://discourse.nodered.org/t/how-to-make-the-dashboard-button-in-dashboard-receive-press-hold-input/86205/5 "2024-03-06T19:25:29Z")

</div>

> [@Long4](#):
>
> I can't make the repeater button work on smartphone

Did you see previous post about touch support?

---

<div class="post-metadata">

### Author: ![Long4](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@Long4](https://discourse.nodered.org/u/Long4)
#### Post date: [6 March 2024 19:34 UTC](https://discourse.nodered.org/t/how-to-make-the-dashboard-button-in-dashboard-receive-press-hold-input/86205/6 "2024-03-06T19:34:52Z")

</div>

OMG you are a live saver:heart\_eyes:, you just solve the first two of my problem now I just have to study your code and look for a solution for the scaling problem

---

<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: [20 March 2024 19:34 UTC](https://discourse.nodered.org/t/how-to-make-the-dashboard-button-in-dashboard-receive-press-hold-input/86205/7 "2024-03-20T19:34:57Z")

</div>

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