Shadcn Autocomplete for React and Tailwind
A searchable input that suggests options while allowing custom values.
Installation
bunx --bun shadcn@latest add https://kit.dev/r/autocomplete.jsonpnpm dlx shadcn@latest add https://kit.dev/r/autocomplete.jsonnpx shadcn@latest add https://kit.dev/r/autocomplete.jsonyarn shadcn@latest add https://kit.dev/r/autocomplete.json<Step>This component depends on Combobox and Separator. Install them first if you haven't already.</Step>
Install the following dependencies:
bun add @ark-ui/react tailwind-variants lucide-reactpnpm add @ark-ui/react tailwind-variants lucide-reactnpm install @ark-ui/react tailwind-variants lucide-reactyarn add @ark-ui/react tailwind-variants lucide-reactCopy and paste the following code into your project.
"use client";
import type { Combobox as ArkCombobox } from "@ark-ui/react/combobox";
import type React from "react";
import {
Combobox,
ComboboxClear,
ComboboxContent,
ComboboxContext,
ComboboxControl,
ComboboxEmpty,
ComboboxGroup,
ComboboxGroupLabel,
ComboboxInput,
ComboboxItem,
ComboboxList,
ComboboxRootProvider,
ComboboxTrigger,
useCombobox,
useComboboxContext,
} from "@/components/ui/combobox";
import { Separator } from "@/components/ui/separator";
export const useAutocomplete = useCombobox;
export const useAutocompleteContext = useComboboxContext;
export const AutocompleteContext: typeof ComboboxContext = ComboboxContext;
export const AutocompleteRootProvider: ArkCombobox.RootProviderComponent = (
props
) => <ComboboxRootProvider data-slot="autocomplete" {...props} />;
export const Autocomplete: ArkCombobox.RootComponent = (props) => (
<Combobox
allowCustomValue
data-slot="autocomplete"
inputBehavior="autocomplete"
{...props}
/>
);
export const AutocompleteControl = (
props: React.ComponentProps<typeof ComboboxControl>
) => <ComboboxControl data-slot="autocomplete-control" {...props} />;
export const AutocompleteInput = (
props: React.ComponentProps<typeof ComboboxInput>
) => {
const { showClear = false, showTrigger = false, ...rest } = props;
return (
<ComboboxInput
data-slot="autocomplete-input"
showClear={showClear}
showTrigger={showTrigger}
{...rest}
/>
);
};
export const AutocompleteGroupLabel = (
props: React.ComponentProps<typeof ComboboxGroupLabel>
) => <ComboboxGroupLabel data-slot="autocomplete-group-label" {...props} />;
export const AutocompleteItem = (
props: React.ComponentProps<typeof ComboboxItem>
) => <ComboboxItem data-slot="autocomplete-item" {...props} />;
export const AutocompleteContent = (
props: React.ComponentProps<typeof ComboboxContent>
) => <ComboboxContent data-slot="autocomplete-content" {...props} />;
export const AutocompleteTrigger = (
props: React.ComponentProps<typeof ComboboxTrigger>
) => <ComboboxTrigger data-slot="autocomplete-trigger" {...props} />;
export const AutocompleteClear = (
props: React.ComponentProps<typeof ComboboxClear>
) => <ComboboxClear data-slot="autocomplete-clear" {...props} />;
export const AutocompleteGroup = (
props: React.ComponentProps<typeof ComboboxGroup>
) => <ComboboxGroup data-slot="autocomplete-group" {...props} />;
export const AutocompleteEmpty = (
props: React.ComponentProps<typeof ComboboxEmpty>
) => <ComboboxEmpty data-slot="autocomplete-empty" {...props} />;
export const AutocompleteList = (
props: React.ComponentProps<typeof ComboboxList>
) => <ComboboxList data-slot="autocomplete-list" {...props} />;
export const AutocompleteCollection = (
props: React.ComponentProps<typeof ComboboxList>
) => <ComboboxList data-slot="autocomplete-collection" {...props} />;
export const AutocompleteSeparator = (
props: React.ComponentProps<typeof Separator>
) => <Separator data-slot="autocomplete-separator" {...props} />;Update the import paths to match your project setup.
Anatomy
Autocomplete
├── AutocompleteInput
│ ├── AutocompleteControl (built in)
│ ├── input
│ ├── AutocompleteTrigger (optional)
│ └── AutocompleteClear (optional)
└── AutocompleteContent
├── AutocompleteEmpty
└── AutocompleteList
└── AutocompleteGroup
├── AutocompleteGroupLabel
└── AutocompleteItemAutocompleteContent portals the list and includes the positioner. AutocompleteItem includes the check indicator.
Use Field for the visible label rather than a separate autocomplete label part.
Usage
Autocomplete is Combobox with allowCustomValue and inputBehavior="autocomplete". Pass a collection and filter as the user types.
import { useListCollection } from "@ark-ui/react/collection";
import { useFilter } from "@ark-ui/react/locale";
import {
Autocomplete,
AutocompleteContent,
AutocompleteEmpty,
AutocompleteGroup,
AutocompleteInput,
AutocompleteItem,
AutocompleteList,
} from "@/components/ui/autocomplete";const { contains } = useFilter({ sensitivity: "base" });
const { collection, filter } = useListCollection({
initialItems: [
{ label: "Apple", value: "apple" },
{ label: "Banana", value: "banana" },
],
filter: contains,
});
<Autocomplete
collection={collection}
onInputValueChange={({ inputValue }) => filter(inputValue)}
>
<AutocompleteInput placeholder="e.g. Apple" />
<AutocompleteContent>
<AutocompleteEmpty />
<AutocompleteList>
{collection.items.map((item) => (
<AutocompleteItem item={item} key={item.value}>
{item.label}
</AutocompleteItem>
))}
</AutocompleteList>
</AutocompleteContent>
</Autocomplete>Controlled
Control the selected value with value and onValueChange. Selected values are always a string[].
Root Provider
Use useAutocomplete with AutocompleteRootProvider when you need the API outside the tree. Pass machine options (collection, allowCustomValue, inputBehavior, …) to useAutocomplete(), not to the provider.
States
Invalid
Disabled
Sizes
Size is set on AutocompleteInput. sm is h-7, md is h-8, lg is h-9.
Small
Medium
Large
Examples
Auto highlight
Highlight the first matching item as the user types with inputBehavior="autohighlight". This overrides Autocomplete’s default autocomplete behavior.
Inline autocomplete
Autocomplete already sets inputBehavior="autocomplete": arrow keys complete the input with the highlighted item. Pair it with a startsWith filter for best results.
Group
Group related items with groupBy on the collection and collection.group() when rendering. AutocompleteGroup accepts a heading for the label.
With Field
Field wires the label, helper text, and error text to the control.
Context
Read selected state with AutocompleteContext or useAutocompleteContext.
Links
Render items as links with asChild. Use selectionBehavior="preserve" so choosing a link does not replace the input value.
Rehydrate
When defaultValue or value is set before the collection loads, call syncSelectedItems() once the items are available so the input shows the selected label.
Highlight text
Highlight the matching query in each item with Highlight.
Dynamic
Build the collection from the current input. Useful for email-style suggestions.
Creatable
Let users add a value that is not in the list. Upsert a temporary “create” item while typing, then replace it on select.
Multiple selection
Set multiple to select more than one item. Selection behavior becomes clear, so render selected items outside the input.
Async search
Load options from an async source with useAsyncList. Filter only on reason === "input-change" so highlighting and selection do not refetch.
Custom object
Map custom objects with itemToString and itemToValue on useListCollection.
Limit results
Pass limit to useListCollection to cap how many items are rendered.
With clear button
Pass showClear to AutocompleteInput. The clear control is shown when the input is not empty.
With trigger
Pass showTrigger to show the chevron that opens the list. Autocomplete hides it by default.
With start icon
Put an InputGroupAddon as a child of AutocompleteInput. Decorative icons should be aria-hidden="true".
Guides
Autocomplete vs Combobox
| Autocomplete | Combobox | |
|---|---|---|
| Custom values | Allowed (allowCustomValue) | Closed list unless you opt in |
| Input behavior | autocomplete | none |
| Trigger | Hidden (showTrigger={false}) | Shown |
| Use when | Free text with suggestions | Pick from a known set, with search |
Use Select when there is no search. Use Command for a command palette. Use Tags Input when the value is a list of removable tags.
Collections
Items live in an Ark collection, not a loose items prop on the root.
const { contains } = useFilter({ sensitivity: "base" });
const { collection, filter } = useListCollection({
initialItems,
filter: contains,
});
<Autocomplete
collection={collection}
onInputValueChange={({ inputValue }) => filter(inputValue)}
>Call filter(inputValue) from onInputValueChange. Render collection.items (or collection.group() when grouping).
Custom objects
By default the collection expects { label, value }. Map other shapes with itemToString and itemToValue:
const { collection } = useListCollection({
initialItems: [
{ country: "Canada", code: "CA", flag: "🇨🇦" },
],
itemToString: (item) => item.country,
itemToValue: (item) => item.code,
});Type safety
Autocomplete is typed as Ark’s RootComponent, so onValueChange infers item types from the collection:
<Autocomplete
collection={collection}
onValueChange={(e) => {
// e.items is T[]
console.log(e.items);
}}
>Large datasets
Prefer limit on useListCollection so only a slice is in the DOM:
const { collection } = useListCollection({
initialItems: items,
limit: 10,
});For very large lists, pass scrollToIndexFn and virtualize the list (for example with TanStack Virtual). Keyboard navigation needs that scroll helper.
Router links
Set navigate on the root when items are links, so in-app routing runs instead of a full navigation:
<Autocomplete
collection={collection}
navigate={(details) => {
router.push(details.node.href);
}}
>NavigateDetails is { value: string; node: HTMLAnchorElement; href: string }.
Available size
The positioner (built into AutocompleteContent) exposes CSS variables you can use on the list:
| CSS variable | Description |
|---|---|
--reference-width | Width of the input control |
--reference-height | Height of the root |
--available-width | Available width in the viewport |
--available-height | Available height in the viewport |
Example: match the input width and cap height to the viewport.
<AutocompleteContent className="w-(--reference-width) max-h-[min(24rem,calc(var(--available-height)-100px))]" />Multiple selection
When multiple is true, selectionBehavior is set to clear. Render selectedItems from context above the input (chips, tags, or a summary). Do not rely on the input to show every selected value.
API Reference
shadcn.io wraps Ark UI Combobox. Defaults below are shadcn.io Autocomplete values. They differ from Ark Combobox for allowCustomValue (true here), inputBehavior (autocomplete here, none in Ark), openOnClick (true here, false in Ark), and lazyMount / unmountOnExit (true here, false in Ark).
asChild merges props onto a single child element.
Autocomplete
Root. Renders a div. Requires a collection.
| Prop | Type | Default | Description |
|---|---|---|---|
collection | ListCollection<T> | required | Items to show. Create with useListCollection or createListCollection. |
allowCustomValue | boolean | true | Allow values that are not in the collection. |
alwaysSubmitOnEnter | boolean | false | Submit on Enter even if the list is open. Useful for single-field forms. |
asChild | boolean | false | Render the child element instead of a div. |
autoFocus | boolean | - | Focus the input on mount. |
className | string | - | Class names on the root. |
closeOnSelect | boolean | - | Close the list when an item is selected. |
composite | boolean | true | Treat as composed with other composite widgets such as tabs. |
defaultHighlightedValue | string | - | Uncontrolled initial highlighted value. |
defaultInputValue | string | "" | Uncontrolled initial input text. |
defaultOpen | boolean | - | Uncontrolled initial open state. |
defaultValue | string[] | [] | Uncontrolled selected values. |
disabled | boolean | - | Disable the autocomplete. |
disableLayer | boolean | - | Do not register as a dismissable layer. |
form | string | - | Associated form id. |
hideMode | "display-none" | "activity" | "display-none" | How to hide mounted-but-closed content. activity needs React 19+. |
highlightedValue | string | - | Controlled highlighted value. |
id | string | - | Unique id for the machine. |
ids | Partial<{ root: string; label: string; control: string; input: string; content: string; trigger: string; clearTrigger: string; item: (id: string, index?: number) => string; positioner: string; itemGroup: (id: string | number) => string; itemGroupLabel: (id: string | number) => string }> | - | Element ids for composition. |
immediate | boolean | - | Apply presence changes immediately instead of the next frame. |
inputBehavior | "none" | "autocomplete" | "autohighlight" | "autocomplete" | autocomplete fills the input from the highlighted item. autohighlight highlights the first match while typing. |
inputValue | string | - | Controlled input text. |
invalid | boolean | - | Mark as invalid. |
lazyMount | boolean | true | Mount the list on first open. |
loopFocus | boolean | true | Loop keyboard focus through items. |
multiple | boolean | - | Allow more than one selected value. Forces selectionBehavior to clear. |
name | string | - | name on the input for form submission. |
navigate | (details: NavigateDetails) => void | - | Called when a link item is chosen. { value, node, href }. |
onExitComplete | () => void | - | Called when the close animation finishes. |
onFocusOutside | (event: FocusOutsideEvent) => void | - | Called when focus moves outside. |
onHighlightChange | (details: HighlightChangeDetails<T>) => void | - | Called when the highlighted item changes. { highlightedValue, highlightedItem }. |
onInputValueChange | (details: InputValueChangeDetails) => void | - | Called when the input text changes. { inputValue, reason }. Filter the collection here. |
onInteractOutside | (event: InteractOutsideEvent) => void | - | Called on outside interaction. |
onOpenChange | (details: OpenChangeDetails) => void | - | Called when open state changes. { open, reason, value }. |
onPointerDownOutside | (event: PointerDownOutsideEvent) => void | - | Called on pointer down outside. |
onSelect | (details: SelectionDetails) => void | - | Called when an item is selected. { value, itemValue }. |
onValueChange | (details: ValueChangeDetails<T>) => void | - | Called when the selection changes. { value: string[]; items: T[] }. |
open | boolean | - | Controlled open state. |
openOnChange | boolean | ((details: InputValueChangeDetails) => boolean) | true | Open the list when the input value changes. |
openOnClick | boolean | true | Open the list on click in the input. |
openOnKeyPress | boolean | true | Open the list on arrow keys. |
placeholder | string | - | Placeholder on the root. Prefer placeholder on AutocompleteInput. |
positioning | PositioningOptions | { placement: "bottom-start" } | Floating position of the list. |
present | boolean | - | Controlled presence. |
readOnly | boolean | - | Non-editable, but still interactive. |
required | boolean | - | Mark as required. |
scrollToIndexFn | (details: ScrollToIndexDetails) => void | - | Scroll a virtualized list to an index. { index, immediate, getElement }. |
selectionBehavior | "clear" | "replace" | "preserve" | "replace" | After select: clear the input, replace it with the item, or leave it. multiple forces clear. |
skipAnimationOnMount | boolean | false | Skip the initial presence animation. |
translations | IntlTranslations | - | { triggerLabel?, clearTriggerLabel? } for assistive labels. |
unmountOnExit | boolean | true | Unmount the list after the close animation. |
value | string[] | - | Controlled selected values. |
| Attribute | Description |
|---|---|
data-slot | autocomplete |
data-scope | combobox |
data-part | root |
data-invalid | Present when invalid |
data-readonly | Present when read-only |
AutocompleteInput
Composed control: Input Group wrapping the searchable input, optional trigger, and optional clear button. Children render as start addons (icons, text). Renders inside AutocompleteControl.
| Prop | Type | Default | Description |
|---|---|---|---|
size | "sm" | "md" | "lg" | "md" | Control height. sm is h-7, md is h-8, lg is h-9. |
showTrigger | boolean | false | Show the chevron that opens the list. Hidden while the clear button is visible. |
showClear | boolean | false | Show a clear button when inputValue is not empty. |
placeholder | string | - | Placeholder on the input. |
disabled | boolean | - | Disable the input. |
className | string | - | Class names on the input group. |
asChild | boolean | false | Merge onto the underlying input. |
Native input attributes (type, aria-label, autoComplete, …) pass through to the input.
The composed control is Combobox’s input group, so the wrapper keeps Combobox slots (combobox-control, combobox-trigger, combobox-clear). The input itself is autocomplete-input.
| Attribute | Description |
|---|---|
data-slot | autocomplete-input on the input |
data-scope | combobox |
data-part | input |
data-invalid | Present when invalid |
data-state | "open" or "closed" |
data-autofocus | Present when autoFocus is set |
AutocompleteControl
Optional wrapper for custom layouts. AutocompleteInput already includes it.
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Merge onto a single child. |
className | string | - | Class names on the control. |
| Attribute | Description |
|---|---|
data-slot | autocomplete-control |
data-scope | combobox |
data-part | control |
data-state | "open" or "closed" |
data-focus | Present when focused |
data-disabled | Present when disabled |
data-invalid | Present when invalid |
AutocompleteTrigger
Opens the list. Used by AutocompleteInput when showTrigger is true. Renders a button.
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Merge onto a single child. |
className | string | - | Class names on the trigger. |
focusable | boolean | - | Whether the trigger is in the tab order. |
| Attribute | Description |
|---|---|
data-slot | autocomplete-trigger |
data-scope | combobox |
data-part | trigger |
data-state | "open" or "closed" |
data-invalid | Present when invalid |
data-readonly | Present when read-only |
data-disabled | Present when disabled |
data-focusable | Present when focusable |
AutocompleteClear
Clears the input. Used by AutocompleteInput when showClear is true. Renders a button.
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Merge onto a single child. |
className | string | - | Class names on the clear control. |
| Attribute | Description |
|---|---|
data-slot | autocomplete-clear |
data-scope | combobox |
data-part | clear-trigger |
data-invalid | Present when invalid |
AutocompleteContent
Portaled list surface. Includes the positioner. Renders a div.
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Merge onto a single child. |
className | string | - | Class names on the content. |
| Attribute | Description |
|---|---|
data-slot | autocomplete-content |
data-scope | combobox |
data-part | content |
data-state | "open" or "closed" |
data-placement | Placement of the content |
data-side | Side of the trigger the content is on |
data-empty | Present when there are no items |
data-nested | Present when nested in another listbox |
data-has-nested | Present when this list has nested listboxes |
| CSS variable | Description |
|---|---|
--layer-index | Index in the dismissable layer stack |
--nested-layer-count | Number of nested comboboxes |
--transform-origin | Transform origin for open/close animation |
--reference-width | Width of the input control (on the positioner) |
--reference-height | Height of the root (on the positioner) |
--available-width | Available width in the viewport (on the positioner) |
--available-height | Available height in the viewport (on the positioner) |
AutocompleteList
Wraps the options. Renders a div.
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Merge onto a single child. |
className | string | - | Class names on the list. |
| Attribute | Description |
|---|---|
data-slot | autocomplete-list |
data-scope | combobox |
data-part | list |
data-empty | Present when there are no items |
AutocompleteItem
A single option. Always uses persistFocus so pointer leave does not clear highlight. Includes a check indicator unless showIndicator={false}. Renders a div.
| Prop | Type | Default | Description |
|---|---|---|---|
item | T | required | Collection item. |
showIndicator | boolean | true | Show the selected check. |
asChild | boolean | false | Merge onto a single child (for example an <a>). |
className | string | - | Class names on the item. |
persistFocus | boolean | true | Keep highlight when the pointer leaves. |
| Attribute | Description |
|---|---|
data-slot | autocomplete-item |
data-scope | combobox |
data-part | item |
data-highlighted | Present when highlighted |
data-state | "checked" or "unchecked" |
data-disabled | Present when disabled |
data-value | The item value |
The indicator is not a separate export.
| Attribute | Description |
|---|---|
data-slot | combobox-item-indicator |
data-scope | combobox |
data-part | item-indicator |
data-state | "checked" or "unchecked" |
AutocompleteGroup
Groups related options. Pass heading to render AutocompleteGroupLabel.
| Prop | Type | Default | Description |
|---|---|---|---|
heading | string | ReactNode | - | Group label. |
id | string | - | Group id. |
asChild | boolean | false | Merge onto a single child. |
className | string | - | Class names on the group. |
| Attribute | Description |
|---|---|
data-slot | autocomplete-group |
data-scope | combobox |
data-part | item-group |
data-empty | Present when the group is empty |
AutocompleteGroupLabel
Label for a group. Usually created by heading on AutocompleteGroup. Renders a div.
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Merge onto a single child. |
className | string | - | Class names on the label. |
| Attribute | Description |
|---|---|
data-slot | autocomplete-group-label |
data-scope | combobox |
data-part | item-group-label |
AutocompleteEmpty
Shown when the filtered collection has no items. Default children: No results found.
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Merge onto a single child. |
className | string | - | Class names on the empty state. |
children | ReactNode | No results found. | Empty message. |
| Attribute | Description |
|---|---|
data-slot | autocomplete-empty |
data-scope | combobox |
data-part | empty |
AutocompleteSeparator
Separator for custom list layouts.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Class names on the separator. |
| Attribute | Description |
|---|---|
data-slot | autocomplete-separator |
AutocompleteRootProvider
Root alternative that takes the API from useAutocomplete. Renders a div.
| Prop | Type | Default | Description |
|---|---|---|---|
value | UseComboboxReturn<T> | required | Return value of useAutocomplete(). |
asChild | boolean | false | Render the child element instead of a div. |
hideMode | "display-none" | "activity" | "display-none" | How to hide mounted-but-closed content. |
immediate | boolean | - | Apply presence changes immediately. |
lazyMount | boolean | true | Mount the list on first open. |
onExitComplete | () => void | - | Called when the close animation finishes. |
present | boolean | - | Controlled presence. |
skipAnimationOnMount | boolean | false | Skip the initial presence animation. |
unmountOnExit | boolean | true | Unmount after the close animation. |
Pass collection, allowCustomValue, inputBehavior, and other machine options to useAutocomplete(), not to AutocompleteRootProvider. To match Autocomplete, pass allowCustomValue: true and inputBehavior: "autocomplete".
| Attribute | Description |
|---|---|
data-slot | autocomplete |
data-scope | combobox |
data-part | root |
useAutocomplete
Creates the autocomplete API for AutocompleteRootProvider. Accepts the same options as Autocomplete except layout-only props.
const autocomplete = useAutocomplete({
allowCustomValue: true,
collection,
inputBehavior: "autocomplete",
onInputValueChange: (details) => filter(details.inputValue),
});
autocomplete.focus();AutocompleteContext / useAutocompleteContext
Render-prop or hook access to autocomplete state. Use inside Autocomplete or AutocompleteRootProvider.
| Property | Type | Description |
|---|---|---|
focused | boolean | Whether the input is focused. |
open | boolean | Whether the list is open. |
inputValue | string | Current input text. |
highlightedValue | string | null | Value of the highlighted item. |
highlightedItem | T | null | Highlighted item. |
setHighlightValue | (value: string) => void | Highlight an item by value. |
clearHighlightValue | () => void | Clear the highlight. |
syncSelectedItems | () => void | Sync selected items after an async collection load. |
selectedItems | T[] | Selected items. |
hasSelectedItems | boolean | Whether any item is selected. |
value | string[] | Selected values. |
valueAsString | string | Selected items as a string. |
selectValue | (value: string) => void | Select a value. |
setValue | (value: string[]) => void | Set the selection. |
clearValue | (value?: string) => void | Clear one value, or all if omitted. |
focus | () => void | Focus the input. |
setInputValue | (value: string, reason?: InputValueChangeReason) => void | Set the input text. |
getItemState | (props: { item: T; persistFocus?: boolean }) => ItemState | State for one item (value, disabled, selected, highlighted). |
setOpen | (open: boolean, reason?: OpenChangeReason) => void | Open or close the list. |
collection | ListCollection<T> | Current collection. |
reposition | (options?: Partial<PositioningOptions>) => void | Update list position. |
multiple | boolean | Whether multiple selection is on. |
disabled | boolean | Whether the autocomplete is disabled. |
AutocompleteContext children: (context) => ReactNode.
Accessibility
Complies with the Combobox WAI-ARIA design pattern. Label the input with Field (FieldLabel) or aria-label on AutocompleteInput. Keep AutocompleteEmpty so a filtered list is not a blank popup.
Keyboard support
| Key | Description |
|---|---|
ArrowDown | When closed, opens the list and highlights the first option. When open, moves to the next option. |
ArrowUp | When closed, opens the list and highlights the last option. When open, moves to the previous option. |
Home | When open, moves to the first option. |
End | When open, moves to the last option. |
Enter | Selects the highlighted option and closes the list. |
Escape | Closes the list. |