Widgets height

Hi, is it possible to reduce the height of say… a st.number_input widget? If I put a st.button in row1col1 and a st.number_input widget in row1col2, their heights do not match. The mismatch carries forward across rows.

Also, is it possible in any way to remove the “+” and “-” from a st.number_input widget?

Thanks in advance.

@Shawn_Pereira

Not as far as I know. You’d have to build a static HTML component with your custom data input widgets (where you can precisely control layout) and have that return values back to your Streamlit app. Take a look at this post on creating the most basic static HTML components which I think solves this issue. An external web server is not required to run this, unlike the React solutions which are more appropriate for building advanced components. However, you’d be responsible for responsive layout in your component and applying theme settings (which you can pass into the component).

HTH,
Arvindra

Thank you @asehmi. Still at rookie level with python & Streamlit. Maybe, I will revisit this later when I reach up to the level of components.

@Shawn_Pereira - I’ve release a new sample app which may interest you.

Thanks @asehmi, will check this out. God bless.