Anybody interested in simple component to float containers?

Hi,
Sorry for getting back to you this late, but I have release a new version (0.3.4) and you should now have access to those transition arguments!

Let me know if there are still issues!

1 Like

Hello! Is there a way to use the float box container to display a streamlit widget. Like the camera widget for example?

For streamlit components/widgets, I would not recommend the float-box function because thats really for markdown content. Instead, I would recommend putting the widget in an st.container and floating the container.

from streamlit_float import *

my_container = st.container()

with my_container:
    # add your widget here
    float_parent()

Note that you can add your own css inside float_parent to position the container and place it where you want on the page. There is a css helper function called float_css_helper as well.

1 Like

Thanks for the quick answer! I’ll give it a try

1 Like

take a look at the github for some usage examples like for the css helper function

this trick saved me, thanks bro

Hello again,

Since Streamlit Version 1.45, certain structural parts of Streamlit apps (DOM) related to containers and columns and even the main block have changed. As a result, containers no longer ‘float’ the same way when using streamllit-float package. This has been noted and brought to my attention by multiple users! It has caused breaking changes and weird behavior. I have implemented a brute force fix in the latest version of streamlit-floatthat I just released (version 0.4.0). I did a bit of testing but not full coverage. Please use the latest version if you are using a version of Streamlit that is 1.45 or later.

Unfortunately, all work on my Streamlit packages has slowed to a crawl. I don’t see this changing in the foreseeable future; I just dont have the time and resources anymore. However, all of my packages are open source and you are very welcome to contribute!