# How to use window width of dashboard to show/hide groups

**URL:** https://discourse.nodered.org/t/how-to-use-window-width-of-dashboard-to-show-hide-groups/11419
**Category:** Dashboard
**Created:** [22 May 2019 11:39 UTC](https://discourse.nodered.org/t/how-to-use-window-width-of-dashboard-to-show-hide-groups/11419 "2019-05-22T11:39:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![GregorR1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorr1/32/12263_2.png) [@GregorR1](https://discourse.nodered.org/u/GregorR1)
#### Post date: [22 May 2019 11:39 UTC](https://discourse.nodered.org/t/how-to-use-window-width-of-dashboard-to-show-hide-groups/11419/1 "2019-05-22T11:39:18Z")

</div>

Hi,

I'm trying to work out a way to use the window width of the dashboard to show and hide groups on the dashboard. I currently am using the Ui\_control node to hide and show the group and this is working fine. The thing I am struggling with is how to get the users' window width and use this in the flow.

How can I get the window width of the dashboard and then use this to trigger the group to show/hide?

Thanks,  
Gregor

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [22 May 2019 18:18 UTC](https://discourse.nodered.org/t/how-to-use-window-width-of-dashboard-to-show-hide-groups/11419/2 "2019-05-22T18:18:02Z")

</div>

I would think (not tried) that a ui\_template node should be able to return the screen dimensions using the necessary javascript (maybe triggered by a ui\_control connect message)

---

<div class="post-metadata">

### Author: ![GregorR1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorr1/32/12263_2.png) [@GregorR1](https://discourse.nodered.org/u/GregorR1)
#### Post date: [23 May 2019 09:11 UTC](https://discourse.nodered.org/t/how-to-use-window-width-of-dashboard-to-show-hide-groups/11419/3 "2019-05-23T09:11:07Z")

</div>

Thanks for the reply. How do I pass the data from the ui\_template back into the node red? I tried using a variable to hold the width and then using "return" but this didn't appear to work.
