How can we get the screen resolution?

Is there currently a way to get the screen resolution, or the width and height. I saw this comment which makes me assume there isn’t, but just checking in case as it would be very helpful in choosing appropriate chart dimensions for the screen size.

It would also be great to get the sidebar width if that’s available, and also if it’s hidden or not.

Hi @DanGolding, thanks for your patience and welcome to the community!

You’re right, getting arbitrary properties that are easy to accomplish via JavaScript instead supported very well (maybe at all, per the issue?). We are releasing functionality to create custom components in the near term, this might be something interesting to try when that arrives. I’m thinking that if a prototype can be developed showing how to pass these values back to Streamlit, it could be a candidate for inclusion in the main library.