1. Component Guide
  2. Search
  3. With custom button text
Search example

With custom button text

The search box component may be used multiple times on a page – for example, on a guidance and regulation finder results page there is both the sitewide search in the header and also for the specific finder.

To avoid confusion, the text inside the button should be different for each form. This can be done by setting the button_text parameter.

This is visually hidden text – to check for changes use a screen reader or inspect the button element.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/search", {
  button_text: "Search absolutely everywhere"
} %>