Existing components
MediaWiki community:
- Wikit (Vue): Lookup, LookupInput
- MediaSearch (Vue): AutocompleteSearchInput (styles)
- OOUI: LookupElement; styles inherited from TextInput and Menu
External libraries:
- Vuetify: Autocomplete
- Buefy: Autocomplete
Wikimedia Design Style Guide links:
- none yet
Potential implementations
The Wikit and MediaSearch implementations are fairly similar: both house all autocomplete logic outside the component, with the component emitting an event with the search term to the parent and the parent passing in menu items if they exist, and both use the same menu component as the select list component. Wikit's implementation has a few additional features:
- Uses the existing Input component for the <input>
- OptionsMenu items can have label and description
- OptionsMenu component has a named slot for content to show when there are no results
We should consider whether to include a label within this component, or to relegate that to a generic Field component that we'll build in the future.
Finally, we need to determine how this component relates to the existing TypeaheadSearch component, and if they should be combined or separate.