Skip to content

tylermassey/elm-autocomplete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elm Autocomplete

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
      }

Demos

Github mention style defaults

simple-autocomplete-elm

Custom styles via CSS classnames. Maybe insert custom HTML for items

typeahead-elm

Control autocomplete inside a textarea or contenteditable

mentions

Try it out

Find these examples and more in the ./examples folder.

Packages

No packages published

Languages

  • Elm 99.1%
  • Shell 0.9%