St.columns not working on mobile version

Hi, I’m using st.columns on st.form.

In mine desktop the widgets align. But in the mobile version not.

I did some tests here and discovered that in the mobile version the app don’t create the columns.
Here are the app link and the app repo

Desktop version:

Mobile version:

The code:

import streamlit as st
with st.form("Test"):
    col1, col2, col3 = st.columns(3)
    with col1:
        st.form_submit_button("Button 1")
    with col2:
        st.form_submit_button("Button 2")
    with col3:
        st.form_submit_button("Button 3")

Accept sugestions to solve this bug, maybe using css or markdown.

Anyone here?

Thanks so much for sharing this, @Guilherme_Hungaro! :balloon:

From @lukasmasuch:

Thanks for reporting this! st.columns are built to be responsive, meaning that it will switch to rendering the columns underneath each other at a certain display size. So, this is more of an enhancement request to add some capabilities to deactivate the responsiveness of columns.

GitHub issue here

1 Like