Form input
Autocomplete
Search and select without mixing the query draft with committed values.Playground
Configure the component and copy synchronized Vue code.
Token map
The manual manifest combines inherited token owners with local deltas.
MAutocomplete · All36 tokens
md-autocompleteMAutocomplete API
Props, slots, and events are generated from the current public kit contract.
Props
NameTypeDefault
disabledPrevents interaction and applies the disabled visual state.booleanfalseloadingReplaces content with progress feedback and prevents interaction.booleanfalsereadonlybooleanfalsevariantExtract<MTextFieldVariant, 'filled' | 'outlined'>'filled'rounded'sharp' | 'small' | 'medium' | 'large' | 'pill''small'labelPlacement'top' | 'float' | 'inset' | 'hidden''float'pathstringundefinednamestringundefinedlabelstringundefinedplaceholderstringundefinedhelperTextstringundefinederrorbooleanfalseerrorMessagestringundefinedrequiredbooleanfalseautofocusbooleanfalseautocompleteBrowser autofill hint for the query input. Lives here, not in the shared dropdown props: the dropdown's field is `readonly`, so autofill can never write to it — only this typeable field can be autofilled. Defaults to `off` because filling free text into a box whose value must match an option would desync the model, but a consumer who knows their form may want it.string'off'density'compact' | 'default' | 'comfortable''default' as MFieldDensityitemsOptions. Every item carries its own `id`; that id is its identity.readonly DropdownItemBase[]() => []itemTitleRow text. Key or getter; defaults to the item's `label`.DropdownRuntimeResolver<string>'label'itemValueValue written to the model. Key or getter; defaults to the whole item.DropdownRuntimeResolver<unknown>undefineditemDisabledPer-item disabled guard. Key or getter; defaults to the item's `disabled`.DropdownRuntimeResolver<boolean>'disabled'valueComparatorValue equality. Defaults to comparing two objects by `id` and everything else by `===` — a refetched list is a new set of object references, and identity is the one thing an item is required to declare.(left: never, right: never) => booleanundefinedmultipleSelect more than one value; the model becomes an array.booleanfalsemandatoryKeep at least one value selected (the last one cannot be removed).booleanfalsemaxUpper bound on the selection. `multiple` only — a single-select field cannot hold two values, so a limit there has nothing to limit.numberundefinedclearableShow a control that empties the selection.booleanfalsemenuPlacementWhere the panel opens relative to the field.'top left' | 'top right' | 'bottom left' | 'bottom right' | 'center' | 'top' | 'bottom''top left'maxHeightCap on the scrolling area of the panel. A number is read as `rem` (the kit's 1rem = 1px-of-the-mockup convention), a string is passed through. Defaults to the panel's own token so the list of a hundred options does not run off the screen. This is live geometry supplied at runtime, so it travels as a custom property — the one case the zero-runtime rule allows.number | stringundefinedfilterHow a row is matched against the query. A function decides per item; `false` shows everything, for a list the server already filtered.false | ((item: never, query: string, title: string) => boolean)undefinedfilterModeBuilt-in matching strategy, used when `filter` is not a function.'contains' | 'starts-with''contains' as AutocompleteFilterModeminSearchLengthCharacters required before anything is shown.number0hideSelectedDrop already-selected rows from the list instead of ticking them.booleanfalseautoSelectFirstPut the virtual focus on the first row as soon as the rows change.booleanfalseopenOnFocusOpen the panel when the field takes focus.booleantrueSlots
Events
@selectTItem@removeTItem@clearvoid@openvoid@closevoid