Dynamic (multi)selection field for LiveView
LiveSelect is a dynamic selection field component for LiveView in Elixir. It allows users to create a search-like interface with type-ahead functionality. The dropdown menu is filled in real-time as the user types, and the component offers features such as single or multiple selection, customizable behavior, and styling options.
To install LiveSelect, add it to your dependencies in your project’s mix.exs
file:
defp deps do
[
{:live_select, "~> 0.1"}
]
end
LiveSelect also relies on Javascript hooks to work. Add LiveSelect’s hooks to your live socket in your app.js
file:
import {socket} from "./socket"
import LiveSocket from "phoenix_live_view"
let liveSocket = new LiveSocket("/live", Socket, {
hooks: {
LiveSelect: require("live_select")
}
})
liveSocket.connect()
LiveSelect is a dynamic selection field component for LiveView in Elixir. It provides a convenient way to create search-like interfaces with type-ahead functionality. With options for single or multiple selection, configurable behavior, and customizable styling, LiveSelect offers flexibility for developers to create interactive interfaces in their LiveView applications.