Digital pattern library

Search bar

The search bar is used to search pages of the University website.

Once a search term has been entered an additional 'clear' button is shown with a number of different behaviours:

Options available


Search bar

The standalone search bar element is the minimum implementaton for a search form.

Example
Code

	

Search banner

The search banner is used to prominently feature a search form on the page.

Example
Code



Search banner (light blue)

The search banner option with the light blue background applied. This is achieved by replacing the class search-bar__grey with search-bar__blue. This example does not include the optional sub heading.

Example
Code



Search banner (background image)

The search banner option with a background image applied. This is achieved by replacing the class search-bar__grey with search-bar__image and applying the background image as an inline style. A dark grey transparent overlay will be automatically applied.

Example
Code



Search banner (constrained)

It is also acceptable to constrain the search banner to a column layout.

Example
Code

	

The search banner option can be extended to include additional supporting links, such as a link to an advanced search.

Example
Code



Additional links can be grouped into categories to limit the number that are initially shown. This is useful in situations where the links would otherwise wrap on to more than one line or some links warrant more importance than others.

Example
Code



Search banner with tag buttons

The search banner option can also be extended to provide suggested search terms in the form of a list of tags.

For this example, search 'St Andrews' to see how the tag buttons are displayed.

Example
Code



Search banner with tag buttons (light blue)

The search banner with tag buttons option with the light blue background applied. This is achieved by replacing the class search-bar__grey with search-bar__blue.

For this example, search 'St Andrews' to see how the tag buttons are displayed.

Example
Code



Search banner with results

The search banner can also be amended to include the results immediately rather than navigating to another page.

For this example, search the word 'english' to see how the results are displayed.

Example
Code



Search banner with results (light blue)

The search banner with results option with the light blue background applied. This is achieved by replacing the class search-bar__grey with search-bar__blue.

For this example, search the word 'english' to see how the results are displayed.

Example
Code



Inline search banner

Example
Code