Clear the text in text_input

I can get the text entered by a user for streamlit.text_input.

Is there a way to empty the text that was entered? It seems that I can only set the text in text_input when I first declared it like streamlit.text_input(‘Text’, ‘My Text’).

Thanks.

Hi @demoacct,

Looks like we still have an open documentation issue around this! Thanks for the reminder. :smiley:

Check out the techniques discussed in the above issue thread and see if one of the ideas – e.g. using a button to reset the input – will work for you.

Thanks!