1. Native <datalist>
Using data from a <datalist> element — the standard browser behaviour, enhanced with styled results.
Basic datalist suggestion
Stored: —
Datalist — selection required
Stored: —
Datalist — multiple values
Stored: —
Datalist — multiple + selection required
Stored: —
2. Static Array Data
Pass data directly via the JS data option (or point data-data to a JSON file).
Basic — search in label
Stored: —
Search in multiple properties (label + color)
Stored: —
Static JSON file (data-data)
Stored: —
searchContain — match anywhere
Stored: —
searchByWord — split on spaces
Stored: —
searchEqual — exact full-string match new
Stored: —
minLength: 0 — show all on focus
Stored: —
searchDisabled — skip local filtering
Stored: —
3. Remote URL (url option)
Queried on every keystroke. For demo purposes we use the local countries.json as
a simulated remote endpoint via data-url.
In production, your server handles filtering server-side.
Remote — basic
Stored: —
Remote — with localStorage cache
Stored: —
searchDelay — 800ms debounce
Stored: —
maxShownResults: 5
Stored: —
4. Multiple Values
Enable with multiple attribute or option. Use Enter ↵ or comma to add tags.
Multiple — free text
Stored: —
Multiple — selection required
Stored: —
Multiple — pre-selected values (ids 1,3,5)
Stored: —
limitOfValues: 3
Stored: —
allowDuplicateValues
Stored: —
removeOnBackspace: false
Stored: —
toggleSelected — click tag to disable
Stored: —
collapseAfterN: 3 new
Stored: —
5. valueProperty
Control what value is stored/submitted. Default = display text. Set '*' to store the whole object as JSON.
Store country id
Stored: —
Store iso2 code
Stored: —
Store entire object (*)
Stored: —
Store entire object — multiple
Stored: —
Free-type + valueProperty *
Stored: —
Static array — store fruit id
Stored: —
6. textProperty
Control what text appears in the input after selection. Supports {placeholder} patterns.
textProperty = "name"
Stored: —
textProperty with {placeholder} pattern
Stored: —
Pattern + multiple + pre-selected (166, 149)
Stored: —
Static data — pattern {label} ({color})
Stored: —
7. groupBy
Group dropdown results by a property value.
Grouped by continent
Stored: —
Grouped by category — static array
Stored: —
8. More Search Options
focusFirstResult — auto-highlight first item
Stored: —
normalizeString — accent-insensitive
Stored: —
redoSearchOnFocus: false
Stored: —
selectionRequired — clears on blur if not selected
Stored: —
9. showAddNewItem new
Show an "Add" option when no results match the keyword.
Single value + add new
Stored: —
Multiple + add new
Stored: —
10. Relatives & Chained Relatives
Pass sibling inputs' values with every remote request. chainedRelatives disables the field until relatives are filled.
Step 1 — Select a country (id=#rel-country)
Stored: —
Step 2 — Relatives (sends #rel-country value to server)
Stored: —
Step 3 — chainedRelatives (disabled until Step 2 is filled)
Stored: —
11. Programmatic API
Test the chainable JS API: getValue, setValue, addValue, removeValue, clear, disable, enable, readonly, search, destroy.
Stored: —
getOption / setOption at runtime
Stored: —
12. Events Log
All CustomEvents dispatched on the element, visible in real time.
Stored: —
Event log
Events will appear here…
13. Disabled & Readonly
Disabled (HTML attr)
Disabled (data-disabled)
Readonly
14. Advanced: Custom valuesSeparator
valuesSeparator: | (pipe)
Stored: —
noResultsText customised
Stored: —