Inputs

DropdownPro

FormKit Pro Quick Installation Guide 🚀

The dropdown input allows users to select a value from a list of options. Unlike native select elements, the dropdown input allows you to customize both its appearance and behavior.

The options prop can accept three different formats of values:

  • An array of objects with value and label keys (see example above)
  • An array of strings ['A', 'B', 'C']
  • An object literal with key-value pairs { a: 'A', b: 'B', c: 'C' }
  • A function that returns any of the above
Empty options

If you assign options as an empty array, the input will be rendered in a disabled state.

Basic examples

Single-select

The dropdown input will render in single-select mode by default.

<script setup>const frameworks = [{ label: 'React', value: 'react' }, { label: 'Vue', value: 'vue' }, { label: 'Angular', value: 'angular' }, { label: 'Svelte', value: 'svelte' },]</script><template>  <FormKit type="form" #default="{ value }" :actions="false">    <FormKit      type="dropdown"      name="framework"      label="Choose your favorite frontend framework"      placeholder="Backbone.js"      popover      :options="frameworks"    />    <pre wrap>{{ value }}</pre>  </FormKit></template>
{}

Multi-select

Dropdown inputs with the prop multiple set will render in multi-select mode.

<script setup>const sandwichToppings = [{ label: 'Lettuce', value: 'lettuce' }, { label: 'Tomato', value: 'tomato' }, { label: 'Onion', value: 'onion' }, { label: 'Pickles', value: 'pickles' }, { label: 'Cheese', value: 'cheese' }, { label: 'Mayo', value: 'mayo' }, { label: 'Mustard', value: 'mustard' }, { label: 'Ketchup', value: 'ketchup' }, { label: 'Avocado', value: 'avocado' }, { label: 'Bacon', value: 'bacon' }, { label: 'Ham', value: 'ham' }, { label: 'Turkey', value: 'turkey' }, { label: 'Chicken', value: 'chicken' }, { label: 'Roast Beef', value: 'roast-beef' }, { label: 'Salami', value: 'salami' }, { label: 'Pastrami', value: 'pastrami' }, { label: 'Tuna', value: 'tuna' }, { label: 'Egg Salad', value: 'egg-salad' }]</script><template>  <FormKit type="form" #default="{ value }" :actions="false">    <FormKit      type="dropdown"      name="sandwich_toppings"      label="Select as many toppings as you would like"      placeholder="Lettuce, tomato, onion, etc."      :options="sandwichToppings"      multiple      popover      :value="['lettuce', 'tomato']"    />    <pre wrap>{{ value }}</pre>  </FormKit></template>
{}
Multi-select input value

Notice in the example above that because the multiple prop is set, the value prop must be an array.

Dynamic options

Instead of passing a static list to the options prop, options can be assigned dynamically.

In this example, the function, loadHorrorMovies, makes a request to the API for TMDB to load a list of horror movies. Assigning the function to the options prop will load the options when the end-user opens the listbox.

<script setup>async function loadHorrorMovies() {  await new Promise((resolve) => setTimeout(resolve, 500))  const res = await fetch(`https://api.themoviedb.org/4/list/8219282?page=1&api_key=f48bcc9ed9cbce41f6c28ea181b67e14`)  if (res.ok) {    const data = await res.json()    // Iterating over results to set the required    // `label` and `value` keys.    return data.results.map((result) => {      return {        label: result.title,        value: result.id      }    })  }  // If the request fails, we return an empty array.  return []}</script><template>  <FormKit    name="horrorMovie"    type="dropdown"    label="Select a horror movie"    placeholder="Example placeholder"    popover    :options="loadHorrorMovies"  /></template>

Always load on open

By default the dropdown will only load options asynchronously once (upon the listbox being expanded). Setting the prop always-load-on-open will cause the dropdown to load options every time the listbox is expanded.

<FormKit  name="horrorMovie"  type="dropdown"  label="Select a horror movie"  placeholder="Example placeholder"  :options="loadHorrorMovies"  popover  always-load-on-open/>

Load on created

The prop load-on-created will cause the dropdown to load options as soon as it is created.

<FormKit  v-if="showDropdown"  name="horrorMovie"  type="dropdown"  label="Select a horror movie"  placeholder="Example placeholder"  popover  :options="loadHorrorMovies"  load-on-created/>

Pagination

A function assigned the options prop will be passed two arguments: page and hasNextPage. The page argument indicates the current page number, and hasNextPage is a callback function that indicates whether there are more pages to load.

<script setup>async function loadCurrentlyPopularMovies({ page, hasNextPage }) {  await new Promise((resolve) => setTimeout(resolve, 500))  const res = await fetch(    `https://api.themoviedb.org/3/movie/popular?api_key=f48bcc9ed9cbce41f6c28ea181b67e14&language=en-US&page=${page}`  )  if (res.ok) {    const data = await res.json()    if (page !== data.total_pages) hasNextPage()    return data.results.map((item) => ({ label: item.title, value: item.id }))  }  return []}</script><template>  <FormKit    name="currentlyPopularMovie"    type="dropdown"    label="Choose a currently popular movie"    :options="loadCurrentlyPopularMovies"    popover    placeholder="Terminator 12"  /></template><style scoped></style>

Load on scroll

If you would rather allow the user to load more options without having to click the Load more option at the bottom of the options list, you can set the load-on-scroll prop to true, and our function, loadCurrentlyPopularMovies will be called again:

<FormKit  type="dropdown"  label="Choose a currently popular movie"  placeholder="Star Wars Part XV"  :options="loadCurrentlyPopularMovies"  popover  load-on-scroll/>

Option loader

FormKit's dropdown input also provides an optionLoader prop that allows you to rehydrate values that are not in the options list. In this example the dropdown is provided an initial value (two movie IDs). The optionLoader function is called for each value that is not in the options list.

<script setup>async function loadCurrentlyPopularMovies({ page, hasNextPage }) {  const res = await fetch(    `https://api.themoviedb.org/3/movie/popular?api_key=f48bcc9ed9cbce41f6c28ea181b67e14&language=en-US&page=${page}`  )  if (res.ok) {    const data = await res.json()    if (page !== data.total_pages) hasNextPage()    return data.results.map((item) => ({ label: item.title, value: item.id }))  }  return []}// The function assigned to the `option-loader` prop will be called with the// value of the option as the first argument (in this case, the movie ID), and// the cached option as the second argument (if it exists).async function loadMovie(id, cachedOption) {  if (cachedOption) return cachedOption  const res = await fetch(    `https://api.themoviedb.org/3/movie/${id}?api_key=f48bcc9ed9cbce41f6c28ea181b67e14&language=en-US`  )  if (res.ok) {    const data = await res.json()    return {      label: data.title,      value: data.id,    }  }  return { label: 'Error loading' }}</script><template>  <FormKit    type="dropdown"    name="currentlyPopularMovie"    label="Choose some movies you would like to see"    placeholder="Avatar, Star Wars..."    :options="loadCurrentlyPopularMovies"    :option-loader="loadMovie"    multiple    popover    :value="[597, 598]"  /></template><style scoped></style>

Notice in the example above that the optionLoader function is passed two arguments: the value of the selected option (in this case, the movie ID) and the cachedOption. The cachedOption prop is used for preventing unnecessary lookups. If the cachedOption is not null it means that the selected option has already been loaded, and you can return the cachedOption directly.

Option appearance

Unlike native select elements, the dropdown input can be customized via. markup.

Option slot

The dropdown input allows you to customize the look and feel of each option by using the option slot. In this example, we are using the option slot to display each option's asset, logo, and name:

<script setup>const frameworks = [{ label: 'React', value: 'react', asset: 'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/react-logo.png'}, { label: 'Vue', value: 'vue', asset: 'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/vue-logo.png'}, { label: 'Angular', value: 'angular', asset: 'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/angular-logo.png',}, { label: 'Svelte', value: 'svelte', asset: 'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/svelte-logo.png'}]</script><template>  <FormKit    type="dropdown"    name="framework"    label="Choose a frontend framework"    placeholder="Example placeholder"    popover    :options="frameworks"  >    <template #option="{ option, classes }">      <div :class="`${classes.option} flex items-center`">        <img :src="option.asset" alt="optionAvatar" class="w-5 mr-2" />        <span>          {{ option.label }}        </span>      </div>    </template>  </FormKit></template>

Selection appearance

The dropdown input allows you to customize the look and feel of the selected option(s).

Selection appearance prop

When using the dropdown input as a multi-select, you can customize the look and feel of the selected options by setting the selection-appearance prop to either truncate (the default) or tags.

dropdown-selection-appearance
countries
<script setup>import countries from './countries.js'</script><template>  <FormKit    type="dropdown"    label="Single-select"    placheolder="Pick a country"    :options="countries"    popover    value="FR"  />  <FormKit    type="dropdown"    label="Truncate appearance"    placheolder="Pick a country"    :options="countries"    popover    multiple    :value="['FR', 'GR', 'ES']"  />  <FormKit    type="dropdown"    label="Tags appearance"    placheolder="Pick a country"    :options="countries"    popover    multiple    selection-appearance="tags"    :value="['FR', 'GR', 'ES']"  /></template>
export default [  { label: 'Afghanistan', value: 'AF' },  { label: 'Åland Islands', value: 'AX' },  { label: 'Albania', value: 'AL' },  { label: 'Algeria', value: 'DZ' },  { label: 'American Samoa', value: 'AS' },  { label: 'AndorrA', value: 'AD' },  { label: 'Angola', value: 'AO' },  { label: 'Anguilla', value: 'AI' },  { label: 'Antarctica', value: 'AQ' },  { label: 'Antigua and Barbuda', value: 'AG' },  { label: 'Argentina', value: 'AR' },  { label: 'Armenia', value: 'AM' },  { label: 'Aruba', value: 'AW' },  { label: 'Australia', value: 'AU' },  { label: 'Austria', value: 'AT' },  { label: 'Azerbaijan', value: 'AZ' },  { label: 'Bahamas', value: 'BS' },  { label: 'Bahrain', value: 'BH' },  { label: 'Bangladesh', value: 'BD' },  { label: 'Barbados', value: 'BB' },  { label: 'Belarus', value: 'BY' },  { label: 'Belgium', value: 'BE' },  { label: 'Belize', value: 'BZ' },  { label: 'Benin', value: 'BJ' },  { label: 'Bermuda', value: 'BM' },  { label: 'Bhutan', value: 'BT' },  { label: 'Bolivia', value: 'BO' },  { label: 'Bosnia and Herzegovina', value: 'BA' },  { label: 'Botswana', value: 'BW' },  { label: 'Bouvet Island', value: 'BV' },  { label: 'Brazil', value: 'BR' },  { label: 'British Indian Ocean Territory', value: 'IO' },  { label: 'Brunei Darussalam', value: 'BN' },  { label: 'Bulgaria', value: 'BG' },  { label: 'Burkina Faso', value: 'BF' },  { label: 'Burundi', value: 'BI' },  { label: 'Cambodia', value: 'KH' },  { label: 'Cameroon', value: 'CM' },  { label: 'Canada', value: 'CA' },  { label: 'Cape Verde', value: 'CV' },  { label: 'Cayman Islands', value: 'KY' },  { label: 'Central African Republic', value: 'CF' },  { label: 'Chad', value: 'TD' },  { label: 'Chile', value: 'CL' },  { label: 'China', value: 'CN' },  { label: 'Christmas Island', value: 'CX' },  { label: 'Cocos (Keeling) Islands', value: 'CC' },  { label: 'Colombia', value: 'CO' },  { label: 'Comoros', value: 'KM' },  { label: 'Congo', value: 'CG' },  { label: 'Congo, The Democratic Republic of the', value: 'CD' },  { label: 'Cook Islands', value: 'CK' },  { label: 'Costa Rica', value: 'CR' },  { label: "Cote D'Ivoire", value: 'CI' },  { label: 'Croatia', value: 'HR' },  { label: 'Cuba', value: 'CU' },  { label: 'Cyprus', value: 'CY' },  { label: 'Czech Republic', value: 'CZ' },  { label: 'Denmark', value: 'DK' },  { label: 'Djibouti', value: 'DJ' },  { label: 'Dominica', value: 'DM' },  { label: 'Dominican Republic', value: 'DO' },  { label: 'Ecuador', value: 'EC' },  { label: 'Egypt', value: 'EG' },  { label: 'El Salvador', value: 'SV' },  { label: 'Equatorial Guinea', value: 'GQ' },  { label: 'Eritrea', value: 'ER' },  { label: 'Estonia', value: 'EE' },  { label: 'Ethiopia', value: 'ET' },  { label: 'Falkland Islands (Malvinas)', value: 'FK' },  { label: 'Faroe Islands', value: 'FO' },  { label: 'Fiji', value: 'FJ' },  { label: 'Finland', value: 'FI' },  { label: 'France', value: 'FR' },  { label: 'French Guiana', value: 'GF' },  { label: 'French Polynesia', value: 'PF' },  { label: 'French Southern Territories', value: 'TF' },  { label: 'Gabon', value: 'GA' },  { label: 'Gambia', value: 'GM' },  { label: 'Georgia', value: 'GE' },  { label: 'Germany', value: 'DE' },  { label: 'Ghana', value: 'GH' },  { label: 'Gibraltar', value: 'GI' },  { label: 'Greece', value: 'GR' },  { label: 'Greenland', value: 'GL' },  { label: 'Grenada', value: 'GD' },  { label: 'Guadeloupe', value: 'GP' },  { label: 'Guam', value: 'GU' },  { label: 'Guatemala', value: 'GT' },  { label: 'Guernsey', value: 'GG' },  { label: 'Guinea', value: 'GN' },  { label: 'Guinea-Bissau', value: 'GW' },  { label: 'Guyana', value: 'GY' },  { label: 'Haiti', value: 'HT' },  { label: 'Heard Island and Mcdonald Islands', value: 'HM' },  { label: 'Holy See (Vatican City State)', value: 'VA' },  { label: 'Honduras', value: 'HN' },  { label: 'Hong Kong', value: 'HK' },  { label: 'Hungary', value: 'HU' },  { label: 'Iceland', value: 'IS' },  { label: 'India', value: 'IN' },  { label: 'Indonesia', value: 'ID' },  { label: 'Iran, Islamic Republic Of', value: 'IR' },  { label: 'Iraq', value: 'IQ' },  { label: 'Ireland', value: 'IE' },  { label: 'Isle of Man', value: 'IM' },  { label: 'Israel', value: 'IL' },  { label: 'Italy', value: 'IT' },  { label: 'Jamaica', value: 'JM' },  { label: 'Japan', value: 'JP' },  { label: 'Jersey', value: 'JE' },  { label: 'Jordan', value: 'JO' },  { label: 'Kazakhstan', value: 'KZ' },  { label: 'Kenya', value: 'KE' },  { label: 'Kiribati', value: 'KI' },  { label: "Korea, Democratic People'S Republic of", value: 'KP' },  { label: 'Korea, Republic of', value: 'KR' },  { label: 'Kuwait', value: 'KW' },  { label: 'Kyrgyzstan', value: 'KG' },  { label: "Lao People'S Democratic Republic", value: 'LA' },  { label: 'Latvia', value: 'LV' },  { label: 'Lebanon', value: 'LB' },  { label: 'Lesotho', value: 'LS' },  { label: 'Liberia', value: 'LR' },  { label: 'Libyan Arab Jamahiriya', value: 'LY' },  { label: 'Liechtenstein', value: 'LI' },  { label: 'Lithuania', value: 'LT' },  { label: 'Luxembourg', value: 'LU' },  { label: 'Macao', value: 'MO' },  { label: 'Macedonia, The Former Yugoslav Republic of', value: 'MK' },  { label: 'Madagascar', value: 'MG' },  { label: 'Malawi', value: 'MW' },  { label: 'Malaysia', value: 'MY' },  { label: 'Maldives', value: 'MV' },  { label: 'Mali', value: 'ML' },  { label: 'Malta', value: 'MT' },  { label: 'Marshall Islands', value: 'MH' },  { label: 'Martinique', value: 'MQ' },  { label: 'Mauritania', value: 'MR' },  { label: 'Mauritius', value: 'MU' },  { label: 'Mayotte', value: 'YT' },  { label: 'Mexico', value: 'MX' },  { label: 'Micronesia, Federated States of', value: 'FM' },  { label: 'Moldova, Republic of', value: 'MD' },  { label: 'Monaco', value: 'MC' },  { label: 'Mongolia', value: 'MN' },  { label: 'Montenegro', value: 'ME' },  { label: 'Montserrat', value: 'MS' },  { label: 'Morocco', value: 'MA' },  { label: 'Mozambique', value: 'MZ' },  { label: 'Myanmar', value: 'MM' },  { label: 'Namibia', value: 'NA' },  { label: 'Nauru', value: 'NR' },  { label: 'Nepal', value: 'NP' },  { label: 'Netherlands', value: 'NL' },  { label: 'Netherlands Antilles', value: 'AN' },  { label: 'New Caledonia', value: 'NC' },  { label: 'New Zealand', value: 'NZ' },  { label: 'Nicaragua', value: 'NI' },  { label: 'Niger', value: 'NE' },  { label: 'Nigeria', value: 'NG' },  { label: 'Niue', value: 'NU' },  { label: 'Norfolk Island', value: 'NF' },  { label: 'Northern Mariana Islands', value: 'MP' },  { label: 'Norway', value: 'NO' },  { label: 'Oman', value: 'OM' },  { label: 'Pakistan', value: 'PK' },  { label: 'Palau', value: 'PW' },  { label: 'Palestinian Territory, Occupied', value: 'PS' },  { label: 'Panama', value: 'PA' },  { label: 'Papua New Guinea', value: 'PG' },  { label: 'Paraguay', value: 'PY' },  { label: 'Peru', value: 'PE' },  { label: 'Philippines', value: 'PH' },  { label: 'Pitcairn', value: 'PN' },  { label: 'Poland', value: 'PL' },  { label: 'Portugal', value: 'PT' },  { label: 'Puerto Rico', value: 'PR' },  { label: 'Qatar', value: 'QA' },  { label: 'Reunion', value: 'RE' },  { label: 'Romania', value: 'RO' },  { label: 'Russian Federation', value: 'RU' },  { label: 'RWANDA', value: 'RW' },  { label: 'Saint Helena', value: 'SH' },  { label: 'Saint Kitts and Nevis', value: 'KN' },  { label: 'Saint Lucia', value: 'LC' },  { label: 'Saint Pierre and Miquelon', value: 'PM' },  { label: 'Saint Vincent and the Grenadines', value: 'VC' },  { label: 'Samoa', value: 'WS' },  { label: 'San Marino', value: 'SM' },  { label: 'Sao Tome and Principe', value: 'ST' },  { label: 'Saudi Arabia', value: 'SA' },  { label: 'Senegal', value: 'SN' },  { label: 'Serbia', value: 'RS' },  { label: 'Seychelles', value: 'SC' },  { label: 'Sierra Leone', value: 'SL' },  { label: 'Singapore', value: 'SG' },  { label: 'Slovakia', value: 'SK' },  { label: 'Slovenia', value: 'SI' },  { label: 'Solomon Islands', value: 'SB' },  { label: 'Somalia', value: 'SO' },  { label: 'South Africa', value: 'ZA' },  { label: 'South Georgia and the South Sandwich Islands', value: 'GS' },  { label: 'Spain', value: 'ES' },  { label: 'Sri Lanka', value: 'LK' },  { label: 'Sudan', value: 'SD' },  { label: 'Suriname', value: 'SR' },  { label: 'Svalbard and Jan Mayen', value: 'SJ' },  { label: 'Swaziland', value: 'SZ' },  { label: 'Sweden', value: 'SE' },  { label: 'Switzerland', value: 'CH' },  { label: 'Syrian Arab Republic', value: 'SY' },  { label: 'Taiwan, Province of China', value: 'TW' },  { label: 'Tajikistan', value: 'TJ' },  { label: 'Tanzania, United Republic of', value: 'TZ' },  { label: 'Thailand', value: 'TH' },  { label: 'Timor-Leste', value: 'TL' },  { label: 'Togo', value: 'TG' },  { label: 'Tokelau', value: 'TK' },  { label: 'Tonga', value: 'TO' },  { label: 'Trinidad and Tobago', value: 'TT' },  { label: 'Tunisia', value: 'TN' },  { label: 'Turkey', value: 'TR' },  { label: 'Turkmenistan', value: 'TM' },  { label: 'Turks and Caicos Islands', value: 'TC' },  { label: 'Tuvalu', value: 'TV' },  { label: 'Uganda', value: 'UG' },  { label: 'Ukraine', value: 'UA' },  { label: 'United Arab Emirates', value: 'AE' },  { label: 'United Kingdom', value: 'GB' },  { label: 'United States', value: 'US' },  { label: 'United States Minor Outlying Islands', value: 'UM' },  { label: 'Uruguay', value: 'UY' },  { label: 'Uzbekistan', value: 'UZ' },  { label: 'Vanuatu', value: 'VU' },  { label: 'Venezuela', value: 'VE' },  { label: 'Viet Nam', value: 'VN' },  { label: 'Virgin Islands, British', value: 'VG' },  { label: 'Virgin Islands, U.S.', value: 'VI' },  { label: 'Wallis and Futuna', value: 'WF' },  { label: 'Western Sahara', value: 'EH' },  { label: 'Yemen', value: 'YE' },  { label: 'Zambia', value: 'ZM' },  { label: 'Zimbabwe', value: 'ZW' },]

Selection slot

If you only want to customize the display of the selected option, use the selection slot (as opposed to the option slot mentioned above):

<script setup>const frameworks = [  {    label: 'React',    value: 'react',    asset:      'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/react-logo.png',  },  {    label: 'Vue',    value: 'vue',    asset:      'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/vue-logo.png',  },  {    label: 'Angular',    value: 'angular',    asset:      'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/angular-logo.png',  },  {    label: 'Svelte',    value: 'svelte',    asset:      'https://s3.amazonaws.com/cdn.formk.it/example-assets/frontend-framework-logos/svelte-logo.png',  },]</script><template>  <FormKit    name="framework"    type="dropdown"    label="Single-select"    placeholder="Example placeholder"    :options="frameworks"    popover    value="vue"  >    <!--SELECTION SLOT-->    <template #selection="{ option, classes }">      <div class="flex items-center">        <img :src="option.asset" alt="optionAvatar" class="w-5 mr-2" />        <span :class="classes.selection">          {{ option.label }}        </span>      </div>    </template>    <!---->  </FormKit>  <FormKit    type="dropdown"    name="framework"    label="Tags appearance"    placeholder="Example placeholder"    :options="frameworks"    multiple    selection-appearance="tags"    :value="['vue', 'angular']"  >    <!--TAG SLOT-->    <template #tag="{ handlers, option, classes }">      <div :class="classes.tag">        <img :src="option.asset" class="w-4 mr-1 bg-white rounded" />        <span :class="classes.tagLabel">          {{ option.label }}        </span>        <span          @click.prevent="handlers.removeSelection(option)()"          tabindex="-1"          type="button"          role="button"          :class="classes.removeSelection"        >          <span :class="`${classes.closeIcon} ${classes.icon}`"            ><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 16">              <path                d="M10,12.5c-.13,0-.26-.05-.35-.15L1.65,4.35c-.2-.2-.2-.51,0-.71,.2-.2,.51-.2,.71,0L10.35,11.65c.2,.2,.2,.51,0,.71-.1,.1-.23,.15-.35,.15Z"                fill="currentColor"              ></path>              <path                d="M2,12.5c-.13,0-.26-.05-.35-.15-.2-.2-.2-.51,0-.71L9.65,3.65c.2-.2,.51-.2,.71,0,.2,.2,.2,.51,0,.71L2.35,12.35c-.1,.1-.23,.15-.35,.15Z"                fill="currentColor"              ></path>            </svg>          </span>        </span>      </div>    </template>    <!--/TAG SLOT-->  </FormKit></template>
Single-select and tags only

The selection slot does not exist on the multi-select dropdown with selection appearance truncate.

Behavioral props

The following props allow you to customize the behavior of the dropdown input.

Empty Message

The dropdown input, by default, will be rendered in a disabled state if no options are passed. Optionally, you may pass the empty-message prop a message to display when no options are available:

<template>  <div>    <FormKit label="No options" :options="[]" type="dropdown" popover />    <FormKit      label="No options, empty message set."      :options="[]"      type="dropdown"      popover      empty-message="No options here!"    />  </div></template><style scoped></style>

Selection Removable

If you would like to allow users to remove the selected value, set the selection-removable prop to true. This will render a close icon next to the selected value:

Single select only

The selection-removable prop cannot be used for multi-selects.

<script setup>const frameworks = [  { label: 'React', value: 'react' },  { label: 'Vue', value: 'vue' },  { label: 'Angular', value: 'angular' },  { label: 'Svelte', value: 'svelte' },]</script><template>  <FormKit type="form" #default="{ value }" :actions="false">    <FormKit      type="dropdown"      name="framework"      label="Choose a frontend framework"      placeholder="Example placeholder"      :options="frameworks"      value="vue"      popover      selection-removable    />    <pre wrap>{{ value }}</pre>  </FormKit></template><style scoped></style>
{}

Open on remove

By default, when the selection-removable prop is set to true, the dropdown will not open after the selected value is removed. You can change this behavior by setting the open-on-remove prop to true:

<script setup>const frameworks = [  { label: 'React', value: 'react' },  { label: 'Vue', value: 'vue' },  { label: 'Angular', value: 'angular' },  { label: 'Svelte', value: 'svelte' },]</script><template>  <FormKit type="form" #default="{ value }" :actions="false">    <FormKit      type="dropdown"      name="framework"      label="Choose a frontend framework"      placeholder="Example placeholder"      :options="frameworks"      value="vue"      popover      selection-removable      open-on-remove    />    <pre wrap>{{ value }}</pre>  </FormKit></template><style scoped></style>
{}

Close on select

By default, when the multiple prop is set, the dropdown will not close after an option is selected. You can change this behavior by setting the close-on-select prop to true:

dropdown-close-on-select
countries
<script setup>import countries from './countries.js'</script><template>  <FormKit type="form" #default="{ value }" :actions="false">    <FormKit      type="dropdown"      name="countries"      label="Choose your favorite countries"      placeholder="Afghanistan, Albania..."      :options="countries"      multiple      popover      :close-on-select="true"    />    <pre wrap>{{ value }}</pre>  </FormKit></template><style scoped></style>
export default [  { label: 'Afghanistan', value: 'AF' },  { label: 'Åland Islands', value: 'AX' },  { label: 'Albania', value: 'AL' },  { label: 'Algeria', value: 'DZ' },  { label: 'American Samoa', value: 'AS' },  { label: 'AndorrA', value: 'AD' },  { label: 'Angola', value: 'AO' },  { label: 'Anguilla', value: 'AI' },  { label: 'Antarctica', value: 'AQ' },  { label: 'Antigua and Barbuda', value: 'AG' },  { label: 'Argentina', value: 'AR' },  { label: 'Armenia', value: 'AM' },  { label: 'Aruba', value: 'AW' },  { label: 'Australia', value: 'AU' },  { label: 'Austria', value: 'AT' },  { label: 'Azerbaijan', value: 'AZ' },  { label: 'Bahamas', value: 'BS' },  { label: 'Bahrain', value: 'BH' },  { label: 'Bangladesh', value: 'BD' },  { label: 'Barbados', value: 'BB' },  { label: 'Belarus', value: 'BY' },  { label: 'Belgium', value: 'BE' },  { label: 'Belize', value: 'BZ' },  { label: 'Benin', value: 'BJ' },  { label: 'Bermuda', value: 'BM' },  { label: 'Bhutan', value: 'BT' },  { label: 'Bolivia', value: 'BO' },  { label: 'Bosnia and Herzegovina', value: 'BA' },  { label: 'Botswana', value: 'BW' },  { label: 'Bouvet Island', value: 'BV' },  { label: 'Brazil', value: 'BR' },  { label: 'British Indian Ocean Territory', value: 'IO' },  { label: 'Brunei Darussalam', value: 'BN' },  { label: 'Bulgaria', value: 'BG' },  { label: 'Burkina Faso', value: 'BF' },  { label: 'Burundi', value: 'BI' },  { label: 'Cambodia', value: 'KH' },  { label: 'Cameroon', value: 'CM' },  { label: 'Canada', value: 'CA' },  { label: 'Cape Verde', value: 'CV' },  { label: 'Cayman Islands', value: 'KY' },  { label: 'Central African Republic', value: 'CF' },  { label: 'Chad', value: 'TD' },  { label: 'Chile', value: 'CL' },  { label: 'China', value: 'CN' },  { label: 'Christmas Island', value: 'CX' },  { label: 'Cocos (Keeling) Islands', value: 'CC' },  { label: 'Colombia', value: 'CO' },  { label: 'Comoros', value: 'KM' },  { label: 'Congo', value: 'CG' },  { label: 'Congo, The Democratic Republic of the', value: 'CD' },  { label: 'Cook Islands', value: 'CK' },  { label: 'Costa Rica', value: 'CR' },  { label: "Cote D'Ivoire", value: 'CI' },  { label: 'Croatia', value: 'HR' },  { label: 'Cuba', value: 'CU' },  { label: 'Cyprus', value: 'CY' },  { label: 'Czech Republic', value: 'CZ' },  { label: 'Denmark', value: 'DK' },  { label: 'Djibouti', value: 'DJ' },  { label: 'Dominica', value: 'DM' },  { label: 'Dominican Republic', value: 'DO' },  { label: 'Ecuador', value: 'EC' },  { label: 'Egypt', value: 'EG' },  { label: 'El Salvador', value: 'SV' },  { label: 'Equatorial Guinea', value: 'GQ' },  { label: 'Eritrea', value: 'ER' },  { label: 'Estonia', value: 'EE' },  { label: 'Ethiopia', value: 'ET' },  { label: 'Falkland Islands (Malvinas)', value: 'FK' },  { label: 'Faroe Islands', value: 'FO' },  { label: 'Fiji', value: 'FJ' },  { label: 'Finland', value: 'FI' },  { label: 'France', value: 'FR' },  { label: 'French Guiana', value: 'GF' },  { label: 'French Polynesia', value: 'PF' },  { label: 'French Southern Territories', value: 'TF' },  { label: 'Gabon', value: 'GA' },  { label: 'Gambia', value: 'GM' },  { label: 'Georgia', value: 'GE' },  { label: 'Germany', value: 'DE' },  { label: 'Ghana', value: 'GH' },  { label: 'Gibraltar', value: 'GI' },  { label: 'Greece', value: 'GR' },  { label: 'Greenland', value: 'GL' },  { label: 'Grenada', value: 'GD' },  { label: 'Guadeloupe', value: 'GP' },  { label: 'Guam', value: 'GU' },  { label: 'Guatemala', value: 'GT' },  { label: 'Guernsey', value: 'GG' },  { label: 'Guinea', value: 'GN' },  { label: 'Guinea-Bissau', value: 'GW' },  { label: 'Guyana', value: 'GY' },  { label: 'Haiti', value: 'HT' },  { label: 'Heard Island and Mcdonald Islands', value: 'HM' },  { label: 'Holy See (Vatican City State)', value: 'VA' },  { label: 'Honduras', value: 'HN' },  { label: 'Hong Kong', value: 'HK' },  { label: 'Hungary', value: 'HU' },  { label: 'Iceland', value: 'IS' },  { label: 'India', value: 'IN' },  { label: 'Indonesia', value: 'ID' },  { label: 'Iran, Islamic Republic Of', value: 'IR' },  { label: 'Iraq', value: 'IQ' },  { label: 'Ireland', value: 'IE' },  { label: 'Isle of Man', value: 'IM' },  { label: 'Israel', value: 'IL' },  { label: 'Italy', value: 'IT' },  { label: 'Jamaica', value: 'JM' },  { label: 'Japan', value: 'JP' },  { label: 'Jersey', value: 'JE' },  { label: 'Jordan', value: 'JO' },  { label: 'Kazakhstan', value: 'KZ' },  { label: 'Kenya', value: 'KE' },  { label: 'Kiribati', value: 'KI' },  { label: "Korea, Democratic People'S Republic of", value: 'KP' },  { label: 'Korea, Republic of', value: 'KR' },  { label: 'Kuwait', value: 'KW' },  { label: 'Kyrgyzstan', value: 'KG' },  { label: "Lao People'S Democratic Republic", value: 'LA' },  { label: 'Latvia', value: 'LV' },  { label: 'Lebanon', value: 'LB' },  { label: 'Lesotho', value: 'LS' },  { label: 'Liberia', value: 'LR' },  { label: 'Libyan Arab Jamahiriya', value: 'LY' },  { label: 'Liechtenstein', value: 'LI' },  { label: 'Lithuania', value: 'LT' },  { label: 'Luxembourg', value: 'LU' },  { label: 'Macao', value: 'MO' },  { label: 'Macedonia, The Former Yugoslav Republic of', value: 'MK' },  { label: 'Madagascar', value: 'MG' },  { label: 'Malawi', value: 'MW' },  { label: 'Malaysia', value: 'MY' },  { label: 'Maldives', value: 'MV' },  { label: 'Mali', value: 'ML' },  { label: 'Malta', value: 'MT' },  { label: 'Marshall Islands', value: 'MH' },  { label: 'Martinique', value: 'MQ' },  { label: 'Mauritania', value: 'MR' },  { label: 'Mauritius', value: 'MU' },  { label: 'Mayotte', value: 'YT' },  { label: 'Mexico', value: 'MX' },  { label: 'Micronesia, Federated States of', value: 'FM' },  { label: 'Moldova, Republic of', value: 'MD' },  { label: 'Monaco', value: 'MC' },  { label: 'Mongolia', value: 'MN' },  { label: 'Montenegro', value: 'ME' },  { label: 'Montserrat', value: 'MS' },  { label: 'Morocco', value: 'MA' },  { label: 'Mozambique', value: 'MZ' },  { label: 'Myanmar', value: 'MM' },  { label: 'Namibia', value: 'NA' },  { label: 'Nauru', value: 'NR' },  { label: 'Nepal', value: 'NP' },  { label: 'Netherlands', value: 'NL' },  { label: 'Netherlands Antilles', value: 'AN' },  { label: 'New Caledonia', value: 'NC' },  { label: 'New Zealand', value: 'NZ' },  { label: 'Nicaragua', value: 'NI' },  { label: 'Niger', value: 'NE' },  { label: 'Nigeria', value: 'NG' },  { label: 'Niue', value: 'NU' },  { label: 'Norfolk Island', value: 'NF' },  { label: 'Northern Mariana Islands', value: 'MP' },  { label: 'Norway', value: 'NO' },  { label: 'Oman', value: 'OM' },  { label: 'Pakistan', value: 'PK' },  { label: 'Palau', value: 'PW' },  { label: 'Palestinian Territory, Occupied', value: 'PS' },  { label: 'Panama', value: 'PA' },  { label: 'Papua New Guinea', value: 'PG' },  { label: 'Paraguay', value: 'PY' },  { label: 'Peru', value: 'PE' },  { label: 'Philippines', value: 'PH' },  { label: 'Pitcairn', value: 'PN' },  { label: 'Poland', value: 'PL' },  { label: 'Portugal', value: 'PT' },  { label: 'Puerto Rico', value: 'PR' },  { label: 'Qatar', value: 'QA' },  { label: 'Reunion', value: 'RE' },  { label: 'Romania', value: 'RO' },  { label: 'Russian Federation', value: 'RU' },  { label: 'RWANDA', value: 'RW' },  { label: 'Saint Helena', value: 'SH' },  { label: 'Saint Kitts and Nevis', value: 'KN' },  { label: 'Saint Lucia', value: 'LC' },  { label: 'Saint Pierre and Miquelon', value: 'PM' },  { label: 'Saint Vincent and the Grenadines', value: 'VC' },  { label: 'Samoa', value: 'WS' },  { label: 'San Marino', value: 'SM' },  { label: 'Sao Tome and Principe', value: 'ST' },  { label: 'Saudi Arabia', value: 'SA' },  { label: 'Senegal', value: 'SN' },  { label: 'Serbia', value: 'RS' },  { label: 'Seychelles', value: 'SC' },  { label: 'Sierra Leone', value: 'SL' },  { label: 'Singapore', value: 'SG' },  { label: 'Slovakia', value: 'SK' },  { label: 'Slovenia', value: 'SI' },  { label: 'Solomon Islands', value: 'SB' },  { label: 'Somalia', value: 'SO' },  { label: 'South Africa', value: 'ZA' },  { label: 'South Georgia and the South Sandwich Islands', value: 'GS' },  { label: 'Spain', value: 'ES' },  { label: 'Sri Lanka', value: 'LK' },  { label: 'Sudan', value: 'SD' },  { label: 'Suriname', value: 'SR' },  { label: 'Svalbard and Jan Mayen', value: 'SJ' },  { label: 'Swaziland', value: 'SZ' },  { label: 'Sweden', value: 'SE' },  { label: 'Switzerland', value: 'CH' },  { label: 'Syrian Arab Republic', value: 'SY' },  { label: 'Taiwan, Province of China', value: 'TW' },  { label: 'Tajikistan', value: 'TJ' },  { label: 'Tanzania, United Republic of', value: 'TZ' },  { label: 'Thailand', value: 'TH' },  { label: 'Timor-Leste', value: 'TL' },  { label: 'Togo', value: 'TG' },  { label: 'Tokelau', value: 'TK' },  { label: 'Tonga', value: 'TO' },  { label: 'Trinidad and Tobago', value: 'TT' },  { label: 'Tunisia', value: 'TN' },  { label: 'Turkey', value: 'TR' },  { label: 'Turkmenistan', value: 'TM' },  { label: 'Turks and Caicos Islands', value: 'TC' },  { label: 'Tuvalu', value: 'TV' },  { label: 'Uganda', value: 'UG' },  { label: 'Ukraine', value: 'UA' },  { label: 'United Arab Emirates', value: 'AE' },  { label: 'United Kingdom', value: 'GB' },  { label: 'United States', value: 'US' },  { label: 'United States Minor Outlying Islands', value: 'UM' },  { label: 'Uruguay', value: 'UY' },  { label: 'Uzbekistan', value: 'UZ' },  { label: 'Vanuatu', value: 'VU' },  { label: 'Venezuela', value: 'VE' },  { label: 'Viet Nam', value: 'VN' },  { label: 'Virgin Islands, British', value: 'VG' },  { label: 'Virgin Islands, U.S.', value: 'VI' },  { label: 'Wallis and Futuna', value: 'WF' },  { label: 'Western Sahara', value: 'EH' },  { label: 'Yemen', value: 'YE' },  { label: 'Zambia', value: 'ZM' },  { label: 'Zimbabwe', value: 'ZW' },]
{}

Open on focus

If you would like expand the listbox as soon as the dropdown input is focused, you can use the open-on-focus prop:

<script setup>const frameworks = [  { label: 'React', value: 'react' },  { label: 'Vue', value: 'vue' },  { label: 'Angular', value: 'angular' },  { label: 'Svelte', value: 'svelte' },]function focusDropdown() {  document.querySelector('#dropdown').focus()}</script><template>  <div>    <FormKit type="button" @click="focusDropdown"      >Click me to focus dropdown</FormKit    >    <FormKit      id="dropdown"      type="dropdown"      name="framework"      label="Choose a frontend framework"      placeholder="Example placeholder"      :options="frameworks"      value="vue"      popover      open-on-focus    />  </div></template><style scoped></style>

Overscroll

When using the dropdown with static options, FormKit's dropdown also comes with a feature called overscroll. Setting the behavior prop to overscroll will render the listbox directly over the input to maximize the available size for the list:

dropdown-overscroll
countries
<FormKit  type="dropdown"  label="Select a country"  :options="countries"  behavior="overscroll"  value="NP"  placeholder="Select a country"/>
export default [  { label: 'Afghanistan', value: 'AF' },  { label: 'Åland Islands', value: 'AX' },  { label: 'Albania', value: 'AL' },  { label: 'Algeria', value: 'DZ' },  { label: 'American Samoa', value: 'AS' },  { label: 'AndorrA', value: 'AD' },  { label: 'Angola', value: 'AO' },  { label: 'Anguilla', value: 'AI' },  { label: 'Antarctica', value: 'AQ' },  { label: 'Antigua and Barbuda', value: 'AG' },  { label: 'Argentina', value: 'AR' },  { label: 'Armenia', value: 'AM' },  { label: 'Aruba', value: 'AW' },  { label: 'Australia', value: 'AU' },  { label: 'Austria', value: 'AT' },  { label: 'Azerbaijan', value: 'AZ' },  { label: 'Bahamas', value: 'BS' },  { label: 'Bahrain', value: 'BH' },  { label: 'Bangladesh', value: 'BD' },  { label: 'Barbados', value: 'BB' },  { label: 'Belarus', value: 'BY' },  { label: 'Belgium', value: 'BE' },  { label: 'Belize', value: 'BZ' },  { label: 'Benin', value: 'BJ' },  { label: 'Bermuda', value: 'BM' },  { label: 'Bhutan', value: 'BT' },  { label: 'Bolivia', value: 'BO' },  { label: 'Bosnia and Herzegovina', value: 'BA' },  { label: 'Botswana', value: 'BW' },  { label: 'Bouvet Island', value: 'BV' },  { label: 'Brazil', value: 'BR' },  { label: 'British Indian Ocean Territory', value: 'IO' },  { label: 'Brunei Darussalam', value: 'BN' },  { label: 'Bulgaria', value: 'BG' },  { label: 'Burkina Faso', value: 'BF' },  { label: 'Burundi', value: 'BI' },  { label: 'Cambodia', value: 'KH' },  { label: 'Cameroon', value: 'CM' },  { label: 'Canada', value: 'CA' },  { label: 'Cape Verde', value: 'CV' },  { label: 'Cayman Islands', value: 'KY' },  { label: 'Central African Republic', value: 'CF' },  { label: 'Chad', value: 'TD' },  { label: 'Chile', value: 'CL' },  { label: 'China', value: 'CN' },  { label: 'Christmas Island', value: 'CX' },  { label: 'Cocos (Keeling) Islands', value: 'CC' },  { label: 'Colombia', value: 'CO' },  { label: 'Comoros', value: 'KM' },  { label: 'Congo', value: 'CG' },  { label: 'Congo, The Democratic Republic of the', value: 'CD' },  { label: 'Cook Islands', value: 'CK' },  { label: 'Costa Rica', value: 'CR' },  { label: "Cote D'Ivoire", value: 'CI' },  { label: 'Croatia', value: 'HR' },  { label: 'Cuba', value: 'CU' },  { label: 'Cyprus', value: 'CY' },  { label: 'Czech Republic', value: 'CZ' },  { label: 'Denmark', value: 'DK' },  { label: 'Djibouti', value: 'DJ' },  { label: 'Dominica', value: 'DM' },  { label: 'Dominican Republic', value: 'DO' },  { label: 'Ecuador', value: 'EC' },  { label: 'Egypt', value: 'EG' },  { label: 'El Salvador', value: 'SV' },  { label: 'Equatorial Guinea', value: 'GQ' },  { label: 'Eritrea', value: 'ER' },  { label: 'Estonia', value: 'EE' },  { label: 'Ethiopia', value: 'ET' },  { label: 'Falkland Islands (Malvinas)', value: 'FK' },  { label: 'Faroe Islands', value: 'FO' },  { label: 'Fiji', value: 'FJ' },  { label: 'Finland', value: 'FI' },  { label: 'France', value: 'FR' },  { label: 'French Guiana', value: 'GF' },  { label: 'French Polynesia', value: 'PF' },  { label: 'French Southern Territories', value: 'TF' },  { label: 'Gabon', value: 'GA' },  { label: 'Gambia', value: 'GM' },  { label: 'Georgia', value: 'GE' },  { label: 'Germany', value: 'DE' },  { label: 'Ghana', value: 'GH' },  { label: 'Gibraltar', value: 'GI' },  { label: 'Greece', value: 'GR' },  { label: 'Greenland', value: 'GL' },  { label: 'Grenada', value: 'GD' },  { label: 'Guadeloupe', value: 'GP' },  { label: 'Guam', value: 'GU' },  { label: 'Guatemala', value: 'GT' },  { label: 'Guernsey', value: 'GG' },  { label: 'Guinea', value: 'GN' },  { label: 'Guinea-Bissau', value: 'GW' },  { label: 'Guyana', value: 'GY' },  { label: 'Haiti', value: 'HT' },  { label: 'Heard Island and Mcdonald Islands', value: 'HM' },  { label: 'Holy See (Vatican City State)', value: 'VA' },  { label: 'Honduras', value: 'HN' },  { label: 'Hong Kong', value: 'HK' },  { label: 'Hungary', value: 'HU' },  { label: 'Iceland', value: 'IS' },  { label: 'India', value: 'IN' },  { label: 'Indonesia', value: 'ID' },  { label: 'Iran, Islamic Republic Of', value: 'IR' },  { label: 'Iraq', value: 'IQ' },  { label: 'Ireland', value: 'IE' },  { label: 'Isle of Man', value: 'IM' },  { label: 'Israel', value: 'IL' },  { label: 'Italy', value: 'IT' },  { label: 'Jamaica', value: 'JM' },  { label: 'Japan', value: 'JP' },  { label: 'Jersey', value: 'JE' },  { label: 'Jordan', value: 'JO' },  { label: 'Kazakhstan', value: 'KZ' },  { label: 'Kenya', value: 'KE' },  { label: 'Kiribati', value: 'KI' },  { label: "Korea, Democratic People'S Republic of", value: 'KP' },  { label: 'Korea, Republic of', value: 'KR' },  { label: 'Kuwait', value: 'KW' },  { label: 'Kyrgyzstan', value: 'KG' },  { label: "Lao People'S Democratic Republic", value: 'LA' },  { label: 'Latvia', value: 'LV' },  { label: 'Lebanon', value: 'LB' },  { label: 'Lesotho', value: 'LS' },  { label: 'Liberia', value: 'LR' },  { label: 'Libyan Arab Jamahiriya', value: 'LY' },  { label: 'Liechtenstein', value: 'LI' },  { label: 'Lithuania', value: 'LT' },  { label: 'Luxembourg', value: 'LU' },  { label: 'Macao', value: 'MO' },  { label: 'Macedonia, The Former Yugoslav Republic of', value: 'MK' },  { label: 'Madagascar', value: 'MG' },  { label: 'Malawi', value: 'MW' },  { label: 'Malaysia', value: 'MY' },  { label: 'Maldives', value: 'MV' },  { label: 'Mali', value: 'ML' },  { label: 'Malta', value: 'MT' },  { label: 'Marshall Islands', value: 'MH' },  { label: 'Martinique', value: 'MQ' },  { label: 'Mauritania', value: 'MR' },  { label: 'Mauritius', value: 'MU' },  { label: 'Mayotte', value: 'YT' },  { label: 'Mexico', value: 'MX' },  { label: 'Micronesia, Federated States of', value: 'FM' },  { label: 'Moldova, Republic of', value: 'MD' },  { label: 'Monaco', value: 'MC' },  { label: 'Mongolia', value: 'MN' },  { label: 'Montenegro', value: 'ME' },  { label: 'Montserrat', value: 'MS' },  { label: 'Morocco', value: 'MA' },  { label: 'Mozambique', value: 'MZ' },  { label: 'Myanmar', value: 'MM' },  { label: 'Namibia', value: 'NA' },  { label: 'Nauru', value: 'NR' },  { label: 'Nepal', value: 'NP' },  { label: 'Netherlands', value: 'NL' },  { label: 'Netherlands Antilles', value: 'AN' },  { label: 'New Caledonia', value: 'NC' },  { label: 'New Zealand', value: 'NZ' },  { label: 'Nicaragua', value: 'NI' },  { label: 'Niger', value: 'NE' },  { label: 'Nigeria', value: 'NG' },  { label: 'Niue', value: 'NU' },  { label: 'Norfolk Island', value: 'NF' },  { label: 'Northern Mariana Islands', value: 'MP' },  { label: 'Norway', value: 'NO' },  { label: 'Oman', value: 'OM' },  { label: 'Pakistan', value: 'PK' },  { label: 'Palau', value: 'PW' },  { label: 'Palestinian Territory, Occupied', value: 'PS' },  { label: 'Panama', value: 'PA' },  { label: 'Papua New Guinea', value: 'PG' },  { label: 'Paraguay', value: 'PY' },  { label: 'Peru', value: 'PE' },  { label: 'Philippines', value: 'PH' },  { label: 'Pitcairn', value: 'PN' },  { label: 'Poland', value: 'PL' },  { label: 'Portugal', value: 'PT' },  { label: 'Puerto Rico', value: 'PR' },  { label: 'Qatar', value: 'QA' },  { label: 'Reunion', value: 'RE' },  { label: 'Romania', value: 'RO' },  { label: 'Russian Federation', value: 'RU' },  { label: 'RWANDA', value: 'RW' },  { label: 'Saint Helena', value: 'SH' },  { label: 'Saint Kitts and Nevis', value: 'KN' },  { label: 'Saint Lucia', value: 'LC' },  { label: 'Saint Pierre and Miquelon', value: 'PM' },  { label: 'Saint Vincent and the Grenadines', value: 'VC' },  { label: 'Samoa', value: 'WS' },  { label: 'San Marino', value: 'SM' },  { label: 'Sao Tome and Principe', value: 'ST' },  { label: 'Saudi Arabia', value: 'SA' },  { label: 'Senegal', value: 'SN' },  { label: 'Serbia', value: 'RS' },  { label: 'Seychelles', value: 'SC' },  { label: 'Sierra Leone', value: 'SL' },  { label: 'Singapore', value: 'SG' },  { label: 'Slovakia', value: 'SK' },  { label: 'Slovenia', value: 'SI' },  { label: 'Solomon Islands', value: 'SB' },  { label: 'Somalia', value: 'SO' },  { label: 'South Africa', value: 'ZA' },  { label: 'South Georgia and the South Sandwich Islands', value: 'GS' },  { label: 'Spain', value: 'ES' },  { label: 'Sri Lanka', value: 'LK' },  { label: 'Sudan', value: 'SD' },  { label: 'Suriname', value: 'SR' },  { label: 'Svalbard and Jan Mayen', value: 'SJ' },  { label: 'Swaziland', value: 'SZ' },  { label: 'Sweden', value: 'SE' },  { label: 'Switzerland', value: 'CH' },  { label: 'Syrian Arab Republic', value: 'SY' },  { label: 'Taiwan, Province of China', value: 'TW' },  { label: 'Tajikistan', value: 'TJ' },  { label: 'Tanzania, United Republic of', value: 'TZ' },  { label: 'Thailand', value: 'TH' },  { label: 'Timor-Leste', value: 'TL' },  { label: 'Togo', value: 'TG' },  { label: 'Tokelau', value: 'TK' },  { label: 'Tonga', value: 'TO' },  { label: 'Trinidad and Tobago', value: 'TT' },  { label: 'Tunisia', value: 'TN' },  { label: 'Turkey', value: 'TR' },  { label: 'Turkmenistan', value: 'TM' },  { label: 'Turks and Caicos Islands', value: 'TC' },  { label: 'Tuvalu', value: 'TV' },  { label: 'Uganda', value: 'UG' },  { label: 'Ukraine', value: 'UA' },  { label: 'United Arab Emirates', value: 'AE' },  { label: 'United Kingdom', value: 'GB' },  { label: 'United States', value: 'US' },  { label: 'United States Minor Outlying Islands', value: 'UM' },  { label: 'Uruguay', value: 'UY' },  { label: 'Uzbekistan', value: 'UZ' },  { label: 'Vanuatu', value: 'VU' },  { label: 'Venezuela', value: 'VE' },  { label: 'Viet Nam', value: 'VN' },  { label: 'Virgin Islands, British', value: 'VG' },  { label: 'Virgin Islands, U.S.', value: 'VI' },  { label: 'Wallis and Futuna', value: 'WF' },  { label: 'Western Sahara', value: 'EH' },  { label: 'Yemen', value: 'YE' },  { label: 'Zambia', value: 'ZM' },  { label: 'Zimbabwe', value: 'ZW' },]

Max

If you would like to limit the number of options that can be selected, you can use the max prop:

dropdown-max
countries
<script setup>import countries from './countries.js'</script><template>  <FormKit type="form" #default="{ value }" :actions="false">    <FormKit      type="dropdown"      name="countries"      label="Choose your favorite countries"      placeholder="Afghanistan, Albania..."      :options="countries"      multiple      popover      max="3"      :value="['AF', 'AL']"    />    <pre wrap>{{ value }}</pre>  </FormKit></template><style scoped></style>
export default [  { label: 'Afghanistan', value: 'AF' },  { label: 'Åland Islands', value: 'AX' },  { label: 'Albania', value: 'AL' },  { label: 'Algeria', value: 'DZ' },  { label: 'American Samoa', value: 'AS' },  { label: 'AndorrA', value: 'AD' },  { label: 'Angola', value: 'AO' },  { label: 'Anguilla', value: 'AI' },  { label: 'Antarctica', value: 'AQ' },  { label: 'Antigua and Barbuda', value: 'AG' },  { label: 'Argentina', value: 'AR' },  { label: 'Armenia', value: 'AM' },  { label: 'Aruba', value: 'AW' },  { label: 'Australia', value: 'AU' },  { label: 'Austria', value: 'AT' },  { label: 'Azerbaijan', value: 'AZ' },  { label: 'Bahamas', value: 'BS' },  { label: 'Bahrain', value: 'BH' },  { label: 'Bangladesh', value: 'BD' },  { label: 'Barbados', value: 'BB' },  { label: 'Belarus', value: 'BY' },  { label: 'Belgium', value: 'BE' },  { label: 'Belize', value: 'BZ' },  { label: 'Benin', value: 'BJ' },  { label: 'Bermuda', value: 'BM' },  { label: 'Bhutan', value: 'BT' },  { label: 'Bolivia', value: 'BO' },  { label: 'Bosnia and Herzegovina', value: 'BA' },  { label: 'Botswana', value: 'BW' },  { label: 'Bouvet Island', value: 'BV' },  { label: 'Brazil', value: 'BR' },  { label: 'British Indian Ocean Territory', value: 'IO' },  { label: 'Brunei Darussalam', value: 'BN' },  { label: 'Bulgaria', value: 'BG' },  { label: 'Burkina Faso', value: 'BF' },  { label: 'Burundi', value: 'BI' },  { label: 'Cambodia', value: 'KH' },  { label: 'Cameroon', value: 'CM' },  { label: 'Canada', value: 'CA' },  { label: 'Cape Verde', value: 'CV' },  { label: 'Cayman Islands', value: 'KY' },  { label: 'Central African Republic', value: 'CF' },  { label: 'Chad', value: 'TD' },  { label: 'Chile', value: 'CL' },  { label: 'China', value: 'CN' },  { label: 'Christmas Island', value: 'CX' },  { label: 'Cocos (Keeling) Islands', value: 'CC' },  { label: 'Colombia', value: 'CO' },  { label: 'Comoros', value: 'KM' },  { label: 'Congo', value: 'CG' },  { label: 'Congo, The Democratic Republic of the', value: 'CD' },  { label: 'Cook Islands', value: 'CK' },  { label: 'Costa Rica', value: 'CR' },  { label: "Cote D'Ivoire", value: 'CI' },  { label: 'Croatia', value: 'HR' },  { label: 'Cuba', value: 'CU' },  { label: 'Cyprus', value: 'CY' },  { label: 'Czech Republic', value: 'CZ' },  { label: 'Denmark', value: 'DK' },  { label: 'Djibouti', value: 'DJ' },  { label: 'Dominica', value: 'DM' },  { label: 'Dominican Republic', value: 'DO' },  { label: 'Ecuador', value: 'EC' },  { label: 'Egypt', value: 'EG' },  { label: 'El Salvador', value: 'SV' },  { label: 'Equatorial Guinea', value: 'GQ' },  { label: 'Eritrea', value: 'ER' },  { label: 'Estonia', value: 'EE' },  { label: 'Ethiopia', value: 'ET' },  { label: 'Falkland Islands (Malvinas)', value: 'FK' },  { label: 'Faroe Islands', value: 'FO' },  { label: 'Fiji', value: 'FJ' },  { label: 'Finland', value: 'FI' },  { label: 'France', value: 'FR' },  { label: 'French Guiana', value: 'GF' },  { label: 'French Polynesia', value: 'PF' },  { label: 'French Southern Territories', value: 'TF' },  { label: 'Gabon', value: 'GA' },  { label: 'Gambia', value: 'GM' },  { label: 'Georgia', value: 'GE' },  { label: 'Germany', value: 'DE' },  { label: 'Ghana', value: 'GH' },  { label: 'Gibraltar', value: 'GI' },  { label: 'Greece', value: 'GR' },  { label: 'Greenland', value: 'GL' },  { label: 'Grenada', value: 'GD' },  { label: 'Guadeloupe', value: 'GP' },  { label: 'Guam', value: 'GU' },  { label: 'Guatemala', value: 'GT' },  { label: 'Guernsey', value: 'GG' },  { label: 'Guinea', value: 'GN' },  { label: 'Guinea-Bissau', value: 'GW' },  { label: 'Guyana', value: 'GY' },  { label: 'Haiti', value: 'HT' },  { label: 'Heard Island and Mcdonald Islands', value: 'HM' },  { label: 'Holy See (Vatican City State)', value: 'VA' },  { label: 'Honduras', value: 'HN' },  { label: 'Hong Kong', value: 'HK' },  { label: 'Hungary', value: 'HU' },  { label: 'Iceland', value: 'IS' },  { label: 'India', value: 'IN' },  { label: 'Indonesia', value: 'ID' },  { label: 'Iran, Islamic Republic Of', value: 'IR' },  { label: 'Iraq', value: 'IQ' },  { label: 'Ireland', value: 'IE' },  { label: 'Isle of Man', value: 'IM' },  { label: 'Israel', value: 'IL' },  { label: 'Italy', value: 'IT' },  { label: 'Jamaica', value: 'JM' },  { label: 'Japan', value: 'JP' },  { label: 'Jersey', value: 'JE' },  { label: 'Jordan', value: 'JO' },  { label: 'Kazakhstan', value: 'KZ' },  { label: 'Kenya', value: 'KE' },  { label: 'Kiribati', value: 'KI' },  { label: "Korea, Democratic People'S Republic of", value: 'KP' },  { label: 'Korea, Republic of', value: 'KR' },  { label: 'Kuwait', value: 'KW' },  { label: 'Kyrgyzstan', value: 'KG' },  { label: "Lao People'S Democratic Republic", value: 'LA' },  { label: 'Latvia', value: 'LV' },  { label: 'Lebanon', value: 'LB' },  { label: 'Lesotho', value: 'LS' },  { label: 'Liberia', value: 'LR' },  { label: 'Libyan Arab Jamahiriya', value: 'LY' },  { label: 'Liechtenstein', value: 'LI' },  { label: 'Lithuania', value: 'LT' },  { label: 'Luxembourg', value: 'LU' },  { label: 'Macao', value: 'MO' },  { label: 'Macedonia, The Former Yugoslav Republic of', value: 'MK' },  { label: 'Madagascar', value: 'MG' },  { label: 'Malawi', value: 'MW' },  { label: 'Malaysia', value: 'MY' },  { label: 'Maldives', value: 'MV' },  { label: 'Mali', value: 'ML' },  { label: 'Malta', value: 'MT' },  { label: 'Marshall Islands', value: 'MH' },  { label: 'Martinique', value: 'MQ' },  { label: 'Mauritania', value: 'MR' },  { label: 'Mauritius', value: 'MU' },  { label: 'Mayotte', value: 'YT' },  { label: 'Mexico', value: 'MX' },  { label: 'Micronesia, Federated States of', value: 'FM' },  { label: 'Moldova, Republic of', value: 'MD' },  { label: 'Monaco', value: 'MC' },  { label: 'Mongolia', value: 'MN' },  { label: 'Montenegro', value: 'ME' },  { label: 'Montserrat', value: 'MS' },  { label: 'Morocco', value: 'MA' },  { label: 'Mozambique', value: 'MZ' },  { label: 'Myanmar', value: 'MM' },  { label: 'Namibia', value: 'NA' },  { label: 'Nauru', value: 'NR' },  { label: 'Nepal', value: 'NP' },  { label: 'Netherlands', value: 'NL' },  { label: 'Netherlands Antilles', value: 'AN' },  { label: 'New Caledonia', value: 'NC' },  { label: 'New Zealand', value: 'NZ' },  { label: 'Nicaragua', value: 'NI' },  { label: 'Niger', value: 'NE' },  { label: 'Nigeria', value: 'NG' },  { label: 'Niue', value: 'NU' },  { label: 'Norfolk Island', value: 'NF' },  { label: 'Northern Mariana Islands', value: 'MP' },  { label: 'Norway', value: 'NO' },  { label: 'Oman', value: 'OM' },  { label: 'Pakistan', value: 'PK' },  { label: 'Palau', value: 'PW' },  { label: 'Palestinian Territory, Occupied', value: 'PS' },  { label: 'Panama', value: 'PA' },  { label: 'Papua New Guinea', value: 'PG' },  { label: 'Paraguay', value: 'PY' },  { label: 'Peru', value: 'PE' },  { label: 'Philippines', value: 'PH' },  { label: 'Pitcairn', value: 'PN' },  { label: 'Poland', value: 'PL' },  { label: 'Portugal', value: 'PT' },  { label: 'Puerto Rico', value: 'PR' },  { label: 'Qatar', value: 'QA' },  { label: 'Reunion', value: 'RE' },  { label: 'Romania', value: 'RO' },  { label: 'Russian Federation', value: 'RU' },  { label: 'RWANDA', value: 'RW' },  { label: 'Saint Helena', value: 'SH' },  { label: 'Saint Kitts and Nevis', value: 'KN' },  { label: 'Saint Lucia', value: 'LC' },  { label: 'Saint Pierre and Miquelon', value: 'PM' },  { label: 'Saint Vincent and the Grenadines', value: 'VC' },  { label: 'Samoa', value: 'WS' },  { label: 'San Marino', value: 'SM' },  { label: 'Sao Tome and Principe', value: 'ST' },  { label: 'Saudi Arabia', value: 'SA' },  { label: 'Senegal', value: 'SN' },  { label: 'Serbia', value: 'RS' },  { label: 'Seychelles', value: 'SC' },  { label: 'Sierra Leone', value: 'SL' },  { label: 'Singapore', value: 'SG' },  { label: 'Slovakia', value: 'SK' },  { label: 'Slovenia', value: 'SI' },  { label: 'Solomon Islands', value: 'SB' },  { label: 'Somalia', value: 'SO' },  { label: 'South Africa', value: 'ZA' },  { label: 'South Georgia and the South Sandwich Islands', value: 'GS' },  { label: 'Spain', value: 'ES' },  { label: 'Sri Lanka', value: 'LK' },  { label: 'Sudan', value: 'SD' },  { label: 'Suriname', value: 'SR' },  { label: 'Svalbard and Jan Mayen', value: 'SJ' },  { label: 'Swaziland', value: 'SZ' },  { label: 'Sweden', value: 'SE' },  { label: 'Switzerland', value: 'CH' },  { label: 'Syrian Arab Republic', value: 'SY' },  { label: 'Taiwan, Province of China', value: 'TW' },  { label: 'Tajikistan', value: 'TJ' },  { label: 'Tanzania, United Republic of', value: 'TZ' },  { label: 'Thailand', value: 'TH' },  { label: 'Timor-Leste', value: 'TL' },  { label: 'Togo', value: 'TG' },  { label: 'Tokelau', value: 'TK' },  { label: 'Tonga', value: 'TO' },  { label: 'Trinidad and Tobago', value: 'TT' },  { label: 'Tunisia', value: 'TN' },  { label: 'Turkey', value: 'TR' },  { label: 'Turkmenistan', value: 'TM' },  { label: 'Turks and Caicos Islands', value: 'TC' },  { label: 'Tuvalu', value: 'TV' },  { label: 'Uganda', value: 'UG' },  { label: 'Ukraine', value: 'UA' },  { label: 'United Arab Emirates', value: 'AE' },  { label: 'United Kingdom', value: 'GB' },  { label: 'United States', value: 'US' },  { label: 'United States Minor Outlying Islands', value: 'UM' },  { label: 'Uruguay', value: 'UY' },  { label: 'Uzbekistan', value: 'UZ' },  { label: 'Vanuatu', value: 'VU' },  { label: 'Venezuela', value: 'VE' },  { label: 'Viet Nam', value: 'VN' },  { label: 'Virgin Islands, British', value: 'VG' },  { label: 'Virgin Islands, U.S.', value: 'VI' },  { label: 'Wallis and Futuna', value: 'WF' },  { label: 'Western Sahara', value: 'EH' },  { label: 'Yemen', value: 'YE' },  { label: 'Zambia', value: 'ZM' },  { label: 'Zimbabwe', value: 'ZW' },]
{}

Props & Attributes

PropType Default Description
optionsany[]The list of options the user can select from.
load-on-scrollbooleanfalseWhen set to true, the dropdown will try loading more options based on the end-user`s scroll position
option-loaderfunctionnullUsed for hydrating initial value, or performing an additional request to load more information of a selected option.
empty-messagestringundefinedRenders a message when there are no options to display.
selection-appearancestringtruncateFor multi-select dropdowns, this prop allows you to customize the look and feel of the selected options. Possible values are truncate (the default) or tags.
selection-removablebooleanfalseFor single-select dropdowns, this prop allows you to remove the selected value.
open-on-removebooleanfalseWhen the selection-removable prop is set to true, the dropdown will not open after the selected value is removed. You can change this behavior by setting the open-on-remove prop to true.
close-on-selectbooleanfalseWhen the multiple prop is set, the dropdown will not close after an option is selected. You can change this behavior by setting the close-on-select prop to true.
open-on-focusbooleanfalseIf you would like expand the listbox as soon as the dropdown input is focused, you can use the open-on-focus prop.
options-appearancestringundefinedFor multi-select dropdowns, this prop allows you to customize the look and feel of the selected options. Possible values are default (the default) or checkbox.
multiplebooleanfalseWhen set to true, the dropdown will allow the user to select multiple options.
behaviorstringundefinedRenders the listbox directly over the input to maximize the available size for the list.
always-load-on-openbooleanfalseDetermines whether the dropdown should always load its options when opened or whether it should reference the options that were previously found when opening.
load-on-createdbooleanfalseWhen set to true, the dropdown will load the options when the node is created.
maxnumber | stringundefinedIf you would like to limit the number of options that can be selected, you can use the max prop (applies only to multi-select).
deselectbooleantrueWhen set to false, the end-user cannot deselect a selected option form the listbox.
popoverbooleanfalseRenders the input's listbox using the browser Popover API.
Show Universal props
configObject{}Configuration options to provide to the input’s node and any descendent node of this input.
delayNumber20Number of milliseconds to debounce an input’s value before the commit hook is dispatched.
dirtyBehaviorstringtouchedDetermines how the "dirty" flag of this input is set. Can be set to touched or comparetouched (the default) is more performant, but will not detect when the form is once again matching its initial state.
errorsArray[]Array of strings to show as error messages on this field.
helpString''Text for help text associated with the input.
idStringinput_{n}The unique id of the input. Providing an id also allows the input’s node to be globally accessed.
ignoreBooleanfalsePrevents an input from being included in any parent (group, list, form etc). Useful when using inputs for UI instead of actual values.
indexNumberundefinedAllows an input to be inserted at the given index if the parent is a list. If the input’s value is undefined, it inherits the value from that index position. If it has a value it inserts it into the lists’s values at the given index.
labelString''Text for the label element associated with the input.
nameStringinput_{n}The name of the input as identified in the data object. This should be unique within a group of fields.
parentFormKitNodecontextualBy default the parent is a wrapping group, list or form — but this props allows explicit assignment of the parent node.
prefix-iconString''Specifies an icon to put in the prefixIcon section.
preserveBooleanfalsePreserves the value of the input on a parent group, list, or form when the input unmounts.
preserve-errorsBooleanfalseBy default errors set on inputs using setErrors are automatically cleared on input, setting this prop to true maintains the error until it is explicitly cleared.
sections-schemaObject{}An object of section keys and schema partial values, where each schema partial is applied to the respective section.
suffix-iconString''Specifies an icon to put in the suffixIcon section.
typeStringtextThe type of input to render from the library.
validationString, Array[]The validation rules to be applied to the input.
validation-visibilityStringblurDetermines when to show an input's failing validation rules. Valid values are blur, dirty, and live.
validation-labelString{label prop}Determines what label to use in validation error messages, by default it uses the label prop if available, otherwise it uses the name prop.
validation-rulesObject{}Additional custom validation rules to make available to the validation prop.
valueAnyundefinedSeeds the initial value of an input and/or its children. Not reactive. Can seed entire groups (forms) and lists..

Sections & slot data

You can target a specific section of an input using that section's "key", allowing you to modify that section's classes, HTML (via :sections-schema, or content (via slots)). Read more about sections here.

Selector structure

The main input structure with selector button and icons.

Select t-shirt color
Select t-shirt color
×
(See listbox diagram)
Turn sound effects on and off.
Something wrong happened.

Listbox structure

The dropdown options list rendered inside dropdownWrapper.

No options to display.
✔️
Gray

Selection structure single

How a selected value displays inside the selector for single-select dropdowns.

Gray

Selection structure truncate

Multi-select with selection-appearance="truncate" (default). Overflow selections show as "+N".

Gray
+1

Selection structure tags

Multi-select with selection-appearance="tags". Selections display as removable tags.

Gray
×
Section-key Description
selectorThe selector section is a button element that opens the dropdown options list.
selectionContains the selected option.
listitemA list item element that contains the option section.
optionA div that contains the option content.
listboxThe listbox section is a ul element that contains the options list.
dropdownWrapperWraps the listbox section. A div that handles scrolling the listbox.
optionLoadingA span element that is conditionally rendered within the selected option when loading is occurring.
loaderIconAn element for outputting an icon in the selector element when loading is occurring.
selectIconAn element for outputting an icon in the selector element when the dropdown is closed.
selectedIconAn element for outputting an icon next to the selected option when inside the listbox.
loadMoreA list item element that is conditionally rendered at the bottom of the options list when there are more pages to load.
loadMoreInnerA span element that acts as a wrapper for the loaderIcon within the loadMore section.
emptyMessageA list item element that is conditionally rendered when there are no options to display.
emptyMessageInnerA span element that acts as a wrapper for the emptyMessage section.
tagsWrapperA div element that wraps the tags section.
tagsA div element that contains the tags.
tagWrapperA div element that wraps the tag.
tagA div element that contains the tag label and removeSelection section.
tagLabelA span element that contains the tag label.
removeSelectionA span element that contains the removeSelection icon.
selectorSelectionsWrapperA div element that wraps the selectorSelections section.
selectorSelectionsA div element that contains the selectorSelectionsItem sections.
selectorSelectionsItemA div element that contains the selectorSelectionsItem content.
truncationCountA div element that contains the truncationCount content.
Show Universal section keys
outerThe outermost wrapping element.
wrapperA wrapper around the label and input.
labelThe label of the input.
prefixHas no output by default, but allows content directly before an input element.
prefixIconAn element for outputting an icon before the prefix section.
innerA wrapper around the actual input element.
suffixHas no output by default, but allows content directly after an input element.
suffixIconAn element for outputting an icon after the suffix section.
inputThe input element itself.
helpThe element containing help text.
messagesA wrapper around all the messages.
messageThe element (or many elements) containing a message — most often validation and error messages.

Accessibility

All FormKit inputs are designed with the following accessibility considerations in mind. Help us continually improve accessibility for all by filing accessibility issues here:

  • Semantic markup
  • ARIA attributes
  • Keyboard accessibility
  • Focus indicators
  • Color contrast with the provided theme
  • Accessible labels, help text, and errors

Accessibility attributes

Section KeyAttributeValueDescription
selectortabindex0Prioritizes keyboard focus order by setting it to 0
aria-haspopuplistboxSignals the presence of a pop-up listbox triggered by interaction.
aria-expandedIndicates whether the dropdown element is currently expanded or collapsed.
aria-controlsLinks this element to the ID of the listbox element.
aria-describedByAssociate this element with descriptive text from another element.
placeholderaria-hiddentrueMakes this element not exposed to the accessibility API when no placeholder exists.
removeSelectiontabindex-1Prioritizes keyboard focus order by setting it to -1
aria-controlsLinks this element to the ID of the input element.
selectionsaria-livepoliteAnnouces to screen readers that this element was dynamically updated without interrupting the current task.
aria-hiddentrueMakes this element not exposed to the accessibility API.
selectionsItemaria-hiddentrueMakes this element not exposed to the accessibility API when last visible index and index are greater than last visible index.
tagWrappertabindex0Prioritizes keyboard focus order by setting it to 0
tagtabindex0Prioritizes keyboard focus order by setting it to 0
tagsWrapperaria-livepoliteAnnouces to screen readers that this element was dynamically updated without interrupting the current task.
Universal Accessibility Attributes
labellabelforAssociates a label to an input element. Users can click on the label to focus the input or to toggle between states.
inputinputdisabledDisables an HTML element, preventing user interaction and signaling a non-interactive state.
aria-describedbyAssociates an element with a description, aiding screen readers.
aria-requiredAdded when input validation is set to required.
iconiconforLinks icon to input element when icon in rendered as a label.

Keyboard Interactions

Keyboard EventDescription
EnterOpens the listbox when the input is focused. Selects an item when a list item is focused
SpaceOpens the listbox when the input is focused. Selects an item when a list item is focused
EscCloses the listbox when the input is focused.
Navigates to previous list item in list box. Closes listbox if most-previous item is selected
Opens the listbox when input is focused. Navigates to next list item in list box.
Universal Keyboard Events
TabMoves the focus to the next focusable element on the page.
Shift+TabMoves the focus to the previous focusable element on the page.