Site search
About this component
To search, users can either enter text in the search box and press return or trigger the magnifying glass icon to the right of the search box.
The site search component can be reused across a site, such as in a site’s header and on search results pages.
Why we use this component
Site search is a commonly recognised component which allows users to quickly find the content they need on a site.
Related components
Website analytics
Tracking of a search is triggered by the q
parameter in the URL when the page loads, and can be analysed with the search's page path and the search query.
Accessibility
The form field and magnifying glass button both include a text label that is hidden from visual browsers but that will be available for screen readers.
The form has a role
attribute of search
.
Feedback, help and support
If you need help or support you can e-mail us at designsystem@gov.scot
There is a problem
Thanks for your feedback