I’m enhancing the user interface of my Streamlit app and I’ve come to a standstill with the file uploader widget. I wish to personalize the text prompts “Drag and drop file here” and “Browse files” to align with the app’s language style. I’ve managed to change the label via st.file_uploader("Your custom text here:", type=['xlsx']), but not these specific strings.
In this case there is a few things to have in mind.
First, using CSS selectors, removing text from a button will require setting the visibility to hidden which will cause the button to disappear. In this demo what I did was set the text of the button to the same color as the button to make it disappear and using an ::after selector add new text. This solution is nowhere near perfect but it should get you close to what you wanted.