Custom component fullscreen using wrappedFullscreenComponent

Iā€™m creating a custom component and Iā€™d like to enable fullscreen functionality that matches the Streamlit native components. Is there any way to make use of the wrappedFullscreenComponent? It doesnā€™t seem to be exported by ā€œstreamlit-component-libā€.

Looks like this person asked a similar question, although it hasnā€™t received an answer yet.

Thanks in advance! :pray:

1 Like

want this solution, too!!

Sharing the answer from this thread here for reference:

While we donā€™t prevent st.html components from calling Element.requestFullscreen() (which you can read more about here), we also donā€™t automatically add a fullscreen button overlay on the st.html component.

As a result, to have a fullscreen option display, you would need to do the following:

  1. The code that you pass to st.html would need to make a call to the Element.requestFullscreen() API.
  2. If you want a button to appear to allow users to select the fullscreen option, youā€™d need to implement it with HTML + JS in the code passed to st.html.

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