# Detect user screen size

**URL:** <https://community.glideapps.com/t/detect-user-screen-size/41568>\
**Category:** Ask for Help\
**Created:** [May 3, 2022, 5:55am UTC](https://community.glideapps.com/t/detect-user-screen-size/41568 "2022-05-03T05:55:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [May 3, 2022, 5:55am UTC](https://community.glideapps.com/t/detect-user-screen-size/41568/1 "2022-05-03T05:55:25Z")

</div>

@Mark  
what is the best way to detect if a user is on mobile using the code column?  
I’m trying navigator but sometimes is blocked. the tablet view is not perfect, and I would want to have the option to show elements if the user is on a desktop.  
is there a chance that it would be a native indicator that we can set visibility depending on screen size?

i wonder if:

`return (window.screen.height)`

will work all the time in Glide App?

thanks.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [May 3, 2022, 8:01am UTC](https://community.glideapps.com/t/detect-user-screen-size/41568/2 "2022-05-03T08:01:12Z")

</div>

I don’t know if there’s a way to do that. Code columns run in a sandboxed iframe. You’ll have to search around and experiment.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [May 3, 2022, 10:13am UTC](https://community.glideapps.com/t/detect-user-screen-size/41568/3 "2022-05-03T10:13:24Z")

</div>

I guess, need to web view my apps and redirect…  
what about my second question… is Glide going to have a native option to condition elements, depending on user screen size? @Mark

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [May 3, 2022, 1:22pm UTC](https://community.glideapps.com/t/detect-user-screen-size/41568/4 "2022-05-03T13:22:58Z")

</div>

Possibly.
