Increase expander's label text size

Hi @lollovela you’ll need some css hacking :slight_smile:

Assuming that you will create external css file called style.css

streamlit app:

import streamlit as st

def local_css(file_name):
    with open(file_name) as f:
        st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)

local_css("style.css")

with st.expander("label"):
    st.write("text")
    st.write("text")
    st.write("text")

style.css

div[data-testid="stExpander"] div[role="button"] p {
    font-size: 4rem;
}

Effect:

2 Likes