DEV Community

Discussion on: How to Build a Search Bar

lukeshiru profile image

Tip: Use type search instead of type text in the input for the search, so it provides better hints to the browser about the usage (making it more accessible, in mobile it will show the magnifying glass icon and so on):

<input type="search" />
Enter fullscreen mode Exit fullscreen mode

Also you might want to check the datalist element, which is designed for autocomplete hints.