Hi everyone! I wanted to ask if you knew how I could also hover over the st.sidebar.expander, st.write and/or checkbox elements. For example:
with st.sidebar.expander("Holidays"):
evaluate = st.sidebar.checkbox(
"Evaluate my model", value=True, help=readme["tooltips"]["choice_eval"]
)
st.checkbox(
“Launch forecast”,
value=False,
help=readme[“tooltips”][“launch_forecast”],
):
st.error(“Please check at least ‘Evaluation’ or ‘Forecast’ in the sidebar.”)
st.write(“# 3. Impact of components and regressors”
Hey @valeriofiorentini ,
Here’s an example for st.expander:
import streamlit as st
with st.expander("Expand me"):
st.write("Hello world")
css=f'''
.streamlit-expander:hover {{
background-color: blue;
}}
'''
st.markdown(f'<style>{css}</style>', unsafe_allow_html=True)
HI! I wanted the writing to become blue, not the background, do you have any suggestions? Now the standard color is red and I would like to change it
At least for me with streamlit==1.29.0, using .streamlit-expander:hover for adding custom css does nothing.
I want to change the font, since .streamlit-expander defaults to a very small font size, but I can’t even get your provided example working. Any ideas?
system
Closed
August 11, 2024, 4:50am
6
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.