Autocomplete example

Select multiple

How it looks (preview)

To select multiple items in a list, hold down Ctrl (PC) or Command (Mac) key.

How to call this example

<%= render "components/autocomplete", {
  id: "autocomplete-multiselect",
  name: "autocomplete-multiselect",
  label: {
    text: "Select your country"
  },
  select: {
    multiple: true,
    options: [
      [
        "France",
        "fr"
      ],
      [
        "Germany",
        "de"
      ],
      [
        "United Kingdom",
        "uk"
      ]
    ],
    selected: [
      "fr",
      "de"
    ]
  }
} %>