Detecting if using mobile browser

Can we determine if a user is viewing the page through a mobile browser?

Iโ€™m using the sidebar to filter data displayed in a graph. If a user is on a desktop browser, Iโ€™d like to show the full data set in the graph. If the user is on a smaller screen, like a mobile browser, Iโ€™d like to show a subset of that data in a graph.

Hi @acedanger,

Welcome to the community, i donโ€™t think streamlit natively supports this, but it should be possible if we are able to delegate the media queries from react side to python.

Maybe the devs can opine on this better, you should definitely log this as a github issue.

Thanks,
Akshansh

Iโ€™ll open an issue there. Thanks.

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