Change height of dropdown selectbox

Hello!

I need to change the height of the of dropdown selectbox, until all the items appear. Is it possible?

Regards!

This seems to do the trick

import streamlit as st

st.selectbox(
    "Select a country",
    [
        "USA",
        "Canada",
        "Mexico",
        "Australia",
        "Japan",
        "Germany",
        "France",
        "Italy",
        "Spain",
        "UK",
    ],
)

st.html("""
<style>
    [data-testid="stVirtualDropdown"] > div {
        height: auto !important;
    }
</style>
""")

Great, thank you so much!!

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