Import and call the registration helper
<script type="module">
import { defineListFilter } from
'https://unpkg.com/@aarongustafson/list-filter@latest/define.js?module';
defineListFilter();
</script>
<list-filter for="drinks" categories></list-filter>
<ul id="drinks">
<li data-category="hot">Lemon tea</li>
<li data-category="cold">Sparkling water</li>
</ul>
- Lemon tea
- Sparkling water