m-wrzr / streamlit-searchbox

Streamlit searchbox that dynamically updates and provides a list of suggestions based on a provided function
MIT License
253 stars 33 forks source link

Feedback when the searchbox is selected #4

Closed hansthen closed 8 months ago

hansthen commented 1 year ago

Is it possible to give some visual feedback when the searchbox is ready to accept search terms?

When the user wants to change an earlier entered search term, they click on the searchbox. However it is not immediately clear they can start a new search. A few suggestions on how to implement this, but I am sure many more are possible:

  1. Add a background color to the search text (like in the browser location bar when it is selected).
  2. Open the dropdown as soon as the searchbox is selected (like in the google search box).
m-wrzr commented 1 year ago

The searchbox now has a colored border when focused and ready to accept searchterms, in addition to the dropdown/clear icons this hopefully indicates the state a bit better.

Thanks for the feedback! Any additional input on visual improvements would be very appreciated!

hansthen commented 1 year ago

I don't know if this is the place, but thanks very much for working on these issues. It is much appreciated.