@logo-elements/combo-box
v23.0.4
Published
`<logo-elements-combo-box>` is a web component for choosing a value from a filterable list of options presented in a dropdown overlay.
Downloads
82
Readme
@logo-elements/combo-box
A web component for choosing a value from a filterable list of options presented in an overlay.
<logo-elements-combo-box
label="User"
placeholder="Please select"
item-value-path="email"
item-label-path="email"
></logo-elements-combo-box>
<script>
const comboBox = document.querySelector('logo-elements-combo-box');
fetch('https://randomuser.me/api?results=100&inc=name,email')
.then((res) => res.json())
.then((json) => (comboBox.items = json.results));
</script>
Installation
Install the component:
npm i @logo-elements/combo-box
Once installed, import the component in your application:
import '@logo-elements/combo-box';