Autocomplete example

Autocomplete search

This is used to style the autocomplete as a search. If applied to an input element the underlying input is rendered with type “search” rather than “text”.

How it looks (preview)

How to call this example

<%= render "components/autocomplete", {
  id: "autocomplete-search",
  name: "autocomplete-search",
  label: {
    text: "Search"
  },
  search: true,
  input: {
    options: [
      "France",
      "Germany",
      "United Kingdom"
    ]
  }
} %>