The .gov.au means it’s official

Australian government websites always use a .gov.au domain. Before sharing sensitive information online, make sure you’re on a .gov.au site by inspecting your browser’s address (or 'location') bar.

This site is secure.

The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Search box


An input that allows users to enter a keyword to filter content on the website.


View changes
npm i @gov.au/searchbox
  • Trevor Brennan avatar picture
  • Christopher Lee avatar picture
  • Gordon Grace avatar picture
  • Alex Page avatar picture
  • Raj Ghuman avatar picture
  • Alexandra Baranov avatar picture
  • Patrick De Young avatar picture


On a landing or home page, it is recommended that the search box be placed in the top right area of the screen. This is where users expect to find the search.

On a search results page, the natural position of the searchbox is closer to the search results. This helps indicate a relationship between the results and the search query.

Additional Attributes

Given the open-ended nature of input expected in a search query, several additional input attributes should be considered to ensure browsers' behaviours are tailored for search queries.

Enabling the autocomplete attribute may risk the unintended exposure of sensitive queries for subsequent uses of the search form, especially where a browser may be in a shared environment.

The autocorrect and spellcheck attributes may not deliver consistent behaviours across users' devices, and even conflict with a server-side autocorrect or spellcheck function provided by the search engine.

The autocapitalize attribute targets touch-screen devices, and does not have wide browser support. Users may not reasonably expect their search queries to be autocapitalised as they type, but most search engines treat queries case-insensitively.

Setting the required attribute may also provide search users with a reminder that "empty" search terms are not able to be submitted, but this is not to be relied on as the sole means of providing that information.