Skip to main content

Datalist

Implementation#

import { Datalist } from "slipstream-ui";
const Example = () => (
<Datalist options={[]} id="suggestions" list="suggestions" />
);

Example#

Example
State Value:
<Datalist
onChange={_handleChange}
options={[{ value: "DVDs", label: "DVDs" }, ...]}
id={id}
list={id}
placeholder="Search Suggestions"
autoComplete="on"
/>

Props#

AttributeTypeValueDefault ValueDescription
idstringe.g. "suggestions"Refer to native element documentation: LINK
liststringe.g. "suggestions"Refer to native element documentation: LINK
optionsarray[{value: '', label: ''}]Array of objects that you which to search with keys: value & label
autoCompletestringon/offonRefer to native element documentation: LINK