Search with autocomplete (experimental) example

With margin bottom

The component accepts a number for margin bottom from 0 to 9 (0px to 60px) using the GOV.UK Frontend spacing scale. It defaults to having a margin bottom value of 6.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/search_with_autocomplete", {
  source_url: "https://www.gov.uk/api/search.json?suggest=autocomplete",
  source_key: "suggested_autocomplete",
  margin_bottom: 9
} %>