Open karriebear opened 4 years ago
Is formatting available in the expander button currently? Or has this not been prioritized?
A simple trick for now:
st.markdown(
"""
<style>
.streamlit-expanderHeader {
font-size: x-large;
}
</style>
""",
unsafe_allow_html=True,
)
Hi, new here to Streamlit, did encounter this limitation as well.
Found some odd undefined behavior as well.
Using markdown for headers #, ## , ### etc in the st.sidebar.expander in the title act odd.
ex
with st.sidebar.expander("# Unchanged Title Size"):
with st.sidebar.expander("#### Larger Title Size"):
It ignores all H1-H3 options, but seems to accept H4 (####) which should make the text smaller but in fact makes it larger (and happens to be suitably large for my case.) ;)
Right now expander only displays the header as a text field. It would be nice to do this with st.header or st.subheader.
Proposal 1
Perhaps a configuration for header type, i.e.
st.expander("header", header_type="header|subheader|text(default)", expanded=True)
Proposal 2
Support markup with header text so that
# header
will display as a header and so on. This could open up too many possibilitiesSource
Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.
If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.