An Autocomplete component in Elm because typing is hard.
Here's a simple example.
main =
let
updateAutocomplete msg autocomplete =
let
( updatedAutocomplete, status ) = Autocomplete.update msg autocomplete
-- status communicates extra information the parent on every update
-- e.g. when the selection changes, the value changes, or the user has triggered a completion
in
updatedAutocomplete
in
Html.beginnerProgram
{ model = Autocomplete.init [ "elm", "makes", "coding", "life", "easy" ]
, update = updateAutocomplete
, view = Autocomplete.view
}
Github mention style defaults
Custom styles via CSS classnames. Maybe insert custom HTML for items
Control autocomplete inside a textarea or contenteditable
Find these examples and more in the ./examples
folder.