Pick a theme
The component ID
The form around the input group.
The form field key.
The form field name.
The input label
The input placeholder
An hint to display below the input
Select can be a single or multiple values input
Select options can either be given directly with assigns (using options) or be pushed to client when the client is typing (see options_phx_event below). You can also mix both to prevent the “empty list effect” when the select get focus but the user did not type anything yet: you just need to pass a limited set of options to options
Name of the phx event that will be triggered to retrieve options as user is typing. The event will be triggered every time user is typing with user input as a value. You should then be returning a structure like this: {options: [{id: 1, value: “option 1”}, …]}
When true, the selected options are fully serialized as JSON in input value attribute. By default value is formatted as a comma separated list of option ids
The LiveComponent or Liveview to send the event to.
Change the payload sent to server to {[options_phx_payload]: value} for event options_phx_event.
options_phx_event
With options_phx_payload=”query”, and input “foo” client will send {query: "foo"}. Without this option, client sends "foo".
{query: "foo"}
"foo"
The current selected item. Can be a single value, a list of id or a list of options.
Set to true to disable the input.
Set to true to make the input readonly (will be submitted).
Extend input group class
Extend label class
Extend input wrapper class
Extend input hint class
List of option group ids that are enabled. Related to can_be_disabled_by.
Key used in option to determine if the options is among the disabled options.
Validate options flag
Only working for single select input
Where to show the dropdown: below, above, or auto