For a few reasons, I wasn’t happy with the current autocomplete components available for Phoenix LiveView, so I decided to have a go at rolling our own. The main differences from what’s out there:
- It uses a form-associated custom element which allows it to interact with the form like any other form input, no hidden input hackery needed.
- It exposes parts and slots to be fully styled via css
- It emits events and receives data via attributes (rather than a separate ajax request)
As always, feedback welcomed. Here is the github repo and hex package