Import and register the class
<script type="module">
import { ListFilterElement } from
'https://esm.sh/@aarongustafson/list-filter@1.0.0/list-filter.js?bundle&target=es2022';
if (!customElements.get('list-filter')) {
customElements.define('list-filter', ListFilterElement);
}
</script>
<list-filter for="drinks" search></list-filter>
<ul id="drinks">
<li>Lemon tea</li>
<li>Sparkling water</li>
</ul>
- Lemon tea
- Sparkling water