Search Inputs
Allow users to enter search queries and receive relevant results with the search input field
Variations
Basic Search Input
Copy as:
copydone
copydone
Outline Search Input
Copy as:
copydone
copydone
Usage
<input>
elements of type search
are very similar to those of type text, except that they are specifically intended for handling search terms.
Specs
Search input fields come in two basic styles (base and outlined) and 2 sizes:
- Base: text font size of 0.875rem (14px).
- Large: text font size of 1rem (16px).
Accessibility notes
For better accessibility when using the <input>
type search
element:
- Use an
aria-label
attribute on the<input>
itself. This should replace the missing label that will be read out as an equivalent by the screen reader. - A
role
attribute of valuesearch
on the<form>
element will cause screen readers to announce that the form is a search form.