Select Input Controller

Select Input Controller is a Stimulus controller for allowing typing to search a "select" element.

Targets

Target Element(s) Description
input input
The input element that will be used to search the select element.
This target is optional. If it is not specified, then the controller will create an input element.
select select
The select element that will be searched.
This target is required.
datalist datalist
The datalist element that will be used to show the options.
This target is optional. If it is not specified, then the controller will create a datalist element.

Attributes

data- Attributes

All of these attributes are prefixed with "data-" in the attribute name.

Attribute Element(s) Default Value(s) Description
controller (any)
selectinput This attribute provides the controller functionality.
placeholder select (string) The placeholder text for the input element.
Only used if data-selectinput-placeholder is not provided.

All of these attributes are prefixed with "data-selectinput-" in the attribute name.

data-selectinput- Attributes

Attribute Element(s) Default Value(s) Description
placeholder input The placeholder text for the input element.
This attribute is optional.