Skip to content

zk-datalist ​

Renders a <datalist> element for input autocomplete suggestions.

Props ​

PropTypeDefaultDescription
idstring|nullnullid attribute — must match the list prop on the linked input
optionsarray[]Key-value pairs: value => label

Examples ​

Linked to an input ​

blade
<x-zk-input name="city" label="City" list="city-suggestions" :field="false" />
<x-zk-datalist id="city-suggestions" :options="[
    'paris' => 'Paris',
    'lyon'  => 'Lyon',
    'nice'  => 'Nice',
]" />

Documentation of 3.2.0 , built from c93e21f on 3.2.0 by pipeline #2919741884 on 2026-10-06.